move the ChangeLog creation to the prebuild target
[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
7 # this target invoked by git-buildpackage using a clean hook, see .gbp.conf
8 prebuild:
9         dch -v `git describe | tr - +` "build for Debian from git"
10         git commit debian/changelog -m "update Debian changelog for build"
11         git log > ChangeLog
12
13 configure: configure-stamp
14 configure-stamp:
15         dh_testdir
16         ./autogen.sh --prefix=/usr
17         touch configure-stamp
18
19 build: build-stamp
20
21 build-stamp: configure-stamp  
22         dh_testdir
23         $(MAKE) VERSION=$(PKG_VERSION)
24         touch $@
25
26 clean: 
27         dh_testdir
28         dh_testroot
29         rm -f build-stamp configure-stamp
30         [ ! -f Makefile ] || $(MAKE) distclean
31         dh_clean 
32
33 install: build
34         dh_testdir
35         dh_testroot
36         dh_prep  
37         dh_installdirs
38
39         $(MAKE) DESTDIR=$(CURDIR)/debian/altos install
40
41 # Build architecture-independent files here.
42 binary-indep: install
43 # We have nothing to do by default.
44
45 # Build architecture-dependent files here.
46 binary-arch: install
47         dh_testdir
48         dh_testroot
49         dh_installchangelogs ChangeLog
50         dh_installdocs
51         dh_installexamples
52         dh_install
53 #       dh_installmenu
54 #       dh_installdebconf
55 #       dh_installlogrotate
56 #       dh_installemacsen
57 #       dh_installpam
58 #       dh_installmime
59 #       dh_python
60 #       dh_installinit
61 #       dh_installcron
62 #       dh_installinfo
63         dh_installman
64         dh_link
65         dh_strip
66         dh_compress
67         dh_fixperms
68 #       dh_perl
69 #       dh_makeshlibs
70         dh_installdeb
71         dh_shlibdeps
72         dh_gencontrol
73         dh_md5sums
74         dh_builddeb
75
76 binary: binary-indep binary-arch
77 .PHONY: build clean binary-indep binary-arch binary install configure