update changelogs for Debian build
[fw/altos] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 export DH_VERBOSE=1
5 PKG_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)/\1/p')
6 DEB_VERSION := $(shell if [ -x /usr/bin/git ]; then git describe; else echo 0; fi | tr - +)
7
8 # this target invoked by git-buildpackage using a clean hook, see .gbp.conf
9 prebuild:
10         echo $(DEB_VERSION)
11         git-dch --release --new-version=$(DEB_VERSION)
12         git log > ChangeLog
13         git commit -n ChangeLog debian/changelog \
14                 -m "update changelogs for Debian build"
15         git tag debian/$(DEB_VERSION)
16         git push --tags origin master
17
18 configure: configure-stamp
19 configure-stamp:
20         dh_testdir
21         ./autogen.sh --prefix=/usr
22         touch configure-stamp
23
24 build: build-stamp
25
26 build-stamp: configure-stamp  
27         dh_testdir
28         $(MAKE) VERSION=$(PKG_VERSION)
29         (cd doc ; $(MAKE))
30         touch $@
31
32 clean: 
33         dh_testdir
34         dh_testroot
35         rm -f build-stamp configure-stamp
36         [ ! -f Makefile ] || $(MAKE) distclean
37         dh_clean 
38
39 install: build
40         dh_testdir
41         dh_testroot
42         dh_prep  
43         dh_installdirs
44
45         $(MAKE) DESTDIR=$(CURDIR)/debian/altos install
46
47 binary-indep: install
48
49 binary-arch: install
50         dh_testdir
51         dh_testroot
52         dh_installchangelogs ChangeLog
53         dh_installdocs
54         dh_installexamples
55         dh_install
56         dh_installmenu
57 #       dh_installdebconf
58 #       dh_installlogrotate
59 #       dh_installemacsen
60 #       dh_installpam
61 #       dh_installmime
62 #       dh_python
63 #       dh_installinit
64 #       dh_installcron
65 #       dh_installinfo
66         dh_installman
67         dh_link
68         dh_strip
69         dh_compress
70         dh_fixperms
71 #       dh_perl
72 #       dh_makeshlibs
73         dh_installdeb
74         dh_shlibdeps
75         dh_gencontrol
76         dh_md5sums
77         dh_builddeb
78
79 binary: binary-indep binary-arch
80 .PHONY: build clean binary-indep binary-arch binary install configure