Leave .ihx files in the build directory too - easier to debug that way
[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         touch $@
30
31 clean: 
32         dh_testdir
33         dh_testroot
34         rm -f build-stamp configure-stamp
35         [ ! -f Makefile ] || $(MAKE) distclean
36         dh_clean 
37
38 install: build
39         dh_testdir
40         dh_testroot
41         dh_prep  
42         dh_installdirs
43
44         $(MAKE) DESTDIR=$(CURDIR)/debian/altos install
45         install -o root -g root -m 0644 debian/altusmetrum.xpm \
46                 $(CURDIR)/debian/altos/usr/share/pixmaps/altusmetrum.xpm
47
48 # Build architecture-independent files here.
49 binary-indep: install
50 # We have nothing to do by default.
51
52 # Build architecture-dependent files here.
53 binary-arch: install
54         dh_testdir
55         dh_testroot
56         dh_installchangelogs ChangeLog
57         dh_installdocs
58         dh_installexamples
59         dh_install
60         dh_installmenu
61 #       dh_installdebconf
62 #       dh_installlogrotate
63 #       dh_installemacsen
64 #       dh_installpam
65 #       dh_installmime
66 #       dh_python
67 #       dh_installinit
68 #       dh_installcron
69 #       dh_installinfo
70         dh_installman
71         dh_link
72         dh_strip
73         dh_compress
74         dh_fixperms
75 #       dh_perl
76 #       dh_makeshlibs
77         dh_installdeb
78         dh_shlibdeps
79         dh_gencontrol
80         dh_md5sums
81         dh_builddeb
82
83 binary: binary-indep binary-arch
84 .PHONY: build clean binary-indep binary-arch binary install configure