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/shell
15 sed -i -e "s/%VERSION%/`git describe --tags`/" ./dbuscron/__init__.py
16 python$(PYVERSION) -O -c 'import dbuscron, dbuscron.shell.main, dbuscron.shell.edit'
17 install -o root -g root -m 0644 ./dbuscron/*.$(PYSUFFIX) $(PYMODULES)/dbuscron
18 install -o root -g root -m 0644 ./dbuscron/shell/*.$(PYSUFFIX) $(PYMODULES)/dbuscron/shell
19 install -o root -g root -m 0644 ./event.d/dbuscron $(DESTDIR)/etc/event.d/dbuscron
20 -test ! -f $(DESTDIR)/etc/dbuscrontab && \
21 install -o root -g root -m 0644 ./doc/dbuscrontab $(DESTDIR)/etc/dbuscrontab
22 @echo "Installation complete. Run \`dbuscrontab -e' to edit config file,"
23 @echo "then run \`initctl start dbuscron' to start dbuscron daemon."
26 -initctl stop dbuscron
27 rm -rf $(PYMODULES)/dbuscron
28 rm -f $(PREFIX)/dbuscron $(PREFIX)/dbuscrontab
29 rm -f $(DESTDIR)/etc/event.d/dbuscron
32 find ./dbuscron -name "*.py[co]" | xargs rm -f
36 rm -rf ./debian/patches ./debian/dbuscron
44 git commit -m "changelog updated" ./debian/changelog
46 git push -f origin v$(B)
49 .PHONY: all install uninstall clean debclean deb build