a649b6d00b0acf455187c658e4cccd348afc2d7e
[conkeror.git] / debian / rules
bloba649b6d00b0acf455187c658e4cccd348afc2d7e
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
6 # This has to be exported to make some magic below work.
7 export DH_OPTIONS
9 # Generating a xulrunner build id and other strings
10 DEBIAN_VERSION := $(shell echo -n `head -1 debian/changelog | sed -e 's/^.*(\(.*\)).*$$/\\1/'`)
12 BUILDID := $(shell echo -n `whoami`@`hostname`)_$(shell date +%s)
14 DPKG_EXPORT_BUILDFLAGS = 1
15 include /usr/share/dpkg/buildflags.mk
17 configure: configure-stamp
18 configure-stamp:
19 dh_testdir
20 touch $@
22 build: build-arch build-indep
23 build-arch: build-arch-stamp
24 build-arch-stamp: configure-stamp
25 dh_auto_build
26 touch $@
28 build-indep: build-indep-stamp
29 build-indep-stamp: configure-stamp
30 touch $@
32 clean:
33 dh_testdir
34 dh_testroot
35 dh_auto_clean
36 dh_clean
38 install: install-indep install-arch
39 install-indep:
40 dh_testdir
41 dh_testroot
42 dh_prep -i
43 dh_installdirs -i
44 dh_install -i
46 # Add generated Build ID and Debian version to version output
47 sed -e 's/BuildID=git/BuildID=${BUILDID}/;s/^Version=\(.*\)$$/Version=\1 (Debian-${DEBIAN_VERSION})/' \
48 -i $(CURDIR)/debian/conkeror/usr/share/conkeror/application.ini
50 # Use Debian version for M-x version output
51 sed -e 's/Version=\(.*\)/Version=\1 (Debian-${DEBIAN_VERSION})/' \
52 -i $(CURDIR)/debian/conkeror/usr/share/conkeror/components/application.js
54 install-arch:
55 dh_testdir
56 dh_testroot
57 dh_prep -s
58 dh_installdirs -s
59 dh_link -s
60 dh_install -s
62 # Must not depend on anything. This is to be called by
63 # binary-arch/binary-indep in another 'make' thread.
64 binary-common:
65 dh_testdir
66 dh_testroot
67 dh_installchangelogs
68 dh_installdocs
69 # dh_installexamples
70 dh_installmenu
71 # dh_installemacsen
72 dh_installman
73 dh_bugfiles
74 dh_lintian
75 dh_link
76 dh_strip
77 dh_compress
78 dh_fixperms
79 dh_makeshlibs
80 dh_installdeb
81 dh_shlibdeps
82 dh_gencontrol
83 dh_md5sums
84 dh_builddeb
86 # Build architecture independant packages using the common target.
87 binary-indep: build-indep install-indep
88 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
90 # Build architecture dependant packages using the common target.
91 binary-arch: build-arch install-arch
92 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
94 binary: binary-arch binary-indep
95 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure