genchangelog: indent shortlog correctly
[dbuscron] / Makefile
1
2 DESTDIR ?= 
3 PYMODULES ?= $(DESTDIR)/usr/lib/pymodules/python2.5
4 PREFIX ?= $(DESTDIR)/usr/bin
5 PYSUFFIX = `test -e ./dbuscron/__init__.pyo && echo pyo || echo pyc`
6 PYVERSION ?= 2.5
7
8 all:
9         @echo "No compilation needed."
10
11 install:
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."
24
25 uninstall:
26         -initctl stop dbuscron
27         rm -rf $(PYMODULES)/dbuscron
28         rm -f $(PREFIX)/dbuscron $(PREFIX)/dbuscrontab
29         rm -f $(DESTDIR)/etc/event.d/dbuscron
30
31 clean:
32         find ./dbuscron -name "*.py[co]" | xargs rm -f 
33
34 debclean:
35         debclean
36         rm -rf ./debian/patches ./debian/dbuscron
37         rm -rf ./.pc
38
39 deb: debclean
40         debuild binary-indep
41
42 build: debclean
43         ./genchangelog $(B)
44         git commit -m "changelog updated" ./debian/changelog
45         git tag -f v$(B)
46         git push -f origin v$(B)
47         $(MAKE) deb
48
49 .PHONY: all install uninstall clean debclean deb build
50