0ec514f044b82b243996a0fda624741d004e658a
[conkeror.git] / debian / rules
blob0ec514f044b82b243996a0fda624741d004e658a
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/'`)
11 BUILDID := $(shell echo -n `whoami`@`hostname`)_$(shell date +%s)
12 USC = $(CURDIR)/debian/conkeror/usr/share/conkeror
14 configure: configure-stamp
15 configure-stamp:
16 dh_testdir
17 touch $@
19 build: build-arch build-indep
20 build-arch: build-arch-stamp
21 build-arch-stamp: configure-stamp
22 dh_auto_build
23 touch $@
25 build-indep: build-indep-stamp
26 build-indep-stamp: configure-stamp
27 touch $@
29 clean:
30 dh_testdir
31 dh_testroot
32 dh_auto_clean
33 dh_clean
35 install: install-indep install-arch
36 install-indep:
37 dh_testdir
38 dh_testroot
39 dh_prep -i
40 dh_installdirs -i
41 dh_install -i
43 # Add generated Build ID and Debian version to version output
44 sed -e 's/BuildID=git/BuildID=${BUILDID}/;s/^Version=\(.*\)$$/Version=\1 (Debian-${DEBIAN_VERSION})/' \
45 -i $(USC)/application.ini
47 # Use Debian version for M-x version output
48 sed -e 's/Version=\(.*\)/Version=\1 (Debian-${DEBIAN_VERSION})/' \
49 -i $(USC)/components/application.js
51 install-arch:
52 dh_testdir
53 dh_testroot
54 dh_prep -s
55 dh_installdirs -s
56 dh_link -s
57 dh_install -s
59 # Must not depend on anything. This is to be called by
60 # binary-arch/binary-indep in another 'make' thread.
61 binary-common:
62 dh_testdir
63 dh_testroot
64 dh_installchangelogs
65 dh_installdocs
66 # dh_installexamples
67 dh_installmenu
68 # dh_installemacsen
69 dh_installman
70 dh_bugfiles
71 dh_lintian
72 dh_link
73 dh_strip
74 dh_compress
75 dh_fixperms
76 dh_makeshlibs
77 dh_installdeb
78 dh_shlibdeps
79 dh_gencontrol
80 dh_md5sums
81 dh_builddeb
83 # Build architecture independant packages using the common target.
84 binary-indep: build-indep install-indep
85 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
87 # Build architecture dependant packages using the common target.
88 binary-arch: build-arch install-arch
89 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
91 binary: binary-arch binary-indep
92 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure