39c93e1cda5b44305075cbf9244c6a32e638b65e
[conkeror.git] / debian / rules
blob39c93e1cda5b44305075cbf9244c6a32e638b65e
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
45 cp -pr branding chrome components content defaults \
46 locale modules search-engines help style \
47 *.manifest \
48 $(CURDIR)/debian/conkeror/usr/share/conkeror/
49 mkdir -p $(CURDIR)/debian/conkeror/usr/share/conkeror/contrib/
50 cp -pr contrib/xrev contrib/art contrib/modules \
51 $(CURDIR)/debian/conkeror/usr/share/conkeror/contrib/
53 # Add generated Build ID and Debian version to version output
54 sed -e 's/BuildID=git/BuildID=${BUILDID}/;s/^Version=\(.*\)$$/Version=\1 (Debian-${DEBIAN_VERSION})/' application.ini \
55 > $(CURDIR)/debian/conkeror/usr/share/conkeror/application.ini
57 # Use Debian version for M-x version output
58 sed -e 's/Version=\(.*\)/Version=\1 (Debian-${DEBIAN_VERSION})/' components/application.js \
59 > $(CURDIR)/debian/conkeror/usr/share/conkeror/components/application.js
60 cp -p debian/conkeror.bin $(CURDIR)/debian/conkeror/usr/bin/conkeror
61 cp -p debian/conkeror.desktop $(CURDIR)/debian/conkeror/usr/share/applications/
63 dh_install -i
65 install-arch:
66 dh_testdir
67 dh_testroot
68 dh_prep -s
69 dh_installdirs -s
70 cp -p conkeror-spawn-helper $(CURDIR)/debian/conkeror-spawn-process-helper/usr/lib/conkeror/
71 ln -s /usr/lib/conkeror/conkeror-spawn-helper $(CURDIR)/debian/conkeror-spawn-process-helper/usr/share/conkeror/
72 dh_install -s
74 # Must not depend on anything. This is to be called by
75 # binary-arch/binary-indep in another 'make' thread.
76 binary-common:
77 dh_testdir
78 dh_testroot
79 dh_installchangelogs
80 dh_installdocs
81 # dh_installexamples
82 dh_installmenu
83 # dh_installemacsen
84 dh_installman
85 dh_bugfiles
86 dh_lintian
87 dh_link
88 dh_strip
89 dh_compress
90 dh_fixperms
91 dh_makeshlibs
92 dh_installdeb
93 dh_shlibdeps
94 dh_gencontrol
95 dh_md5sums
96 dh_builddeb
98 # Build architecture independant packages using the common target.
99 binary-indep: build-indep install-indep
100 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
102 # Build architecture dependant packages using the common target.
103 binary-arch: build-arch install-arch
104 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
106 binary: binary-arch binary-indep
107 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure