3 PYMODULES ?= $(DESTDIR)/usr/lib/pymodules/python2.5
4 PREFIX ?= $(DESTDIR)/usr/bin
5 PYSUFFIX = `test -e ./dbuscron/__init__.pyo && echo pyo || echo pyc`
9 @echo "No compilation needed."
12 install -o root -g root -m 0755 ./dbuscron.py $(PREFIX)/dbuscron
13 install -o root -g root -m 0755 ./dbuscrontab.py $(PREFIX)/dbuscrontab
14 install -o root -g root -m 0755 -d $(PYMODULES)/dbuscron
15 python$(PYVERSION) -O -c 'import dbuscron'
16 install -o root -g root -m 0644 ./dbuscron/*.$(PYSUFFIX) $(PYMODULES)/dbuscron
17 install -o root -g root -m 0644 ./event.d/dbuscron $(DESTDIR)/etc/event.d/dbuscron
18 touch $(DESTDIR)/etc/dbuscrontab
19 @echo "Installation complete. Run \`dbuscrontab -e' to edit config file,"
20 @echo "then run \`initctl start dbuscron' to start dbuscron daemon."
23 -initctl stop dbuscron
24 rm -rf $(PYMODULES)/dbuscron
25 rm -f $(PREFIX)/dbuscron $(PREFIX)/dbuscrontab
26 rm -f $(DESTDIR)/etc/event.d/dbuscron
29 find ./dbuscron -name "*.py[co]" | xargs rm -f
31 .PHONY: all install uninstall clean