a7468b9f5c99814da86002ffd31fd184eb7df2e6
[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         install -o root -g root -m 0644 debian/altusmetrum.xpm \
47                 $(CURDIR)/debian/altos/usr/share/pixmaps/altusmetrum.xpm
48
49 # Build architecture-independent files here.
50 binary-indep: install
51 # We have nothing to do by default.
52
53 # Build architecture-dependent files here.
54 binary-arch: install
55         dh_testdir
56         dh_testroot
57         dh_installchangelogs ChangeLog
58         dh_installdocs
59         dh_installexamples
60         dh_install
61         dh_installmenu
62 #       dh_installdebconf
63 #       dh_installlogrotate
64 #       dh_installemacsen
65 #       dh_installpam
66 #       dh_installmime
67 #       dh_python
68 #       dh_installinit
69 #       dh_installcron
70 #       dh_installinfo
71         dh_installman
72         dh_link
73         dh_strip
74         dh_compress
75         dh_fixperms
76 #       dh_perl
77 #       dh_makeshlibs
78         dh_installdeb
79         dh_shlibdeps
80         dh_gencontrol
81         dh_md5sums
82         dh_builddeb
83
84 binary: binary-indep binary-arch
85 .PHONY: build clean binary-indep binary-arch binary install configure