Debian: Only include contrib/xrev in conkeror binary package
[conkeror.git] / debian / rules
blobe95d20535188abbf2b21d5cce6d937aa98e5c56f
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 UPSTREAM_VERSION := $(shell grep ^Version= application.ini | sed -e 's/^Version=//')
11 DEBIAN_VERSION := $(shell echo -n `head -1 debian/changelog | sed -e 's/^.*(\(.*\)).*$$/\\1/'`)
13 BUILDID := $(shell echo -n `whoami`@`hostname`)_$(shell date +%s)
15 include /usr/share/quilt/quilt.make
17 configure: configure-stamp
18 configure-stamp: $(QUILT_STAMPFN)
19 dh_testdir
20 # Add here commands to configure the package.
22 touch configure-stamp
24 # Architecture
25 build: build-arch build-indep
27 build-arch: build-arch-stamp
28 build-arch-stamp: configure-stamp
29 # Add here commands to compile the arch part of the package.
30 make
32 touch $@
34 build-indep: build-indep-stamp
35 build-indep-stamp: configure-stamp
36 # Add here commands to compile the indep part of the package.
37 #$(MAKE) doc
39 touch $@
41 clean: unpatch
42 dh_testdir
43 dh_testroot
44 rm -f build-arch-stamp build-indep-stamp configure-stamp
46 # Add here commands to clean up after the build process.
47 $(MAKE) clean
49 dh_clean
51 install: install-indep install-arch
52 install-indep:
53 dh_testdir
54 dh_testroot
55 dh_prep -i
56 dh_installdirs -i
58 # Add here commands to install the indep part of the package into
59 # debian/<package>
60 cp -pr branding chrome components content defaults \
61 locale modules search-engines help style \
62 $(CURDIR)/debian/conkeror/usr/share/conkeror/
63 mkdir -p $(CURDIR)/debian/conkeror/usr/share/conkeror/contrib/
64 cp -pr contrib/xrev \
65 $(CURDIR)/debian/conkeror/usr/share/conkeror/contrib/
66 # Add generated Build ID and Debian version to version output
67 sed -e 's/BuildID=git/BuildID=${BUILDID}/;s/^Version=\(.*\)$$/Version=\1 (Debian-${DEBIAN_VERSION})/' application.ini \
68 > $(CURDIR)/debian/conkeror/usr/share/conkeror/application.ini
69 # Use Debian version for M-x version output
70 sed -e 's/\$$CONKEROR_VERSION\$$/${UPSTREAM_VERSION} (Debian-${DEBIAN_VERSION})/' components/application.js \
71 > $(CURDIR)/debian/conkeror/usr/share/conkeror/components/application.js
72 cp -p debian/conkeror.bin $(CURDIR)/debian/conkeror/usr/bin/conkeror
73 cp -p debian/conkeror.desktop $(CURDIR)/debian/conkeror/usr/share/applications/
74 # Supporting all currently known places of xulrunner-stub on
75 # debianoid systems
76 ln -vs ../../lib/xulrunner/xulrunner-stub $(CURDIR)/debian/conkeror/usr/share/conkeror/xulrunner-stub
77 ln -vs ../../lib/xulrunner-1.9/xulrunner-stub $(CURDIR)/debian/conkeror/usr/share/conkeror/xulrunner-stub-1.9
78 ln -vs ../../lib/xulrunner-1.9.1/xulrunner-stub $(CURDIR)/debian/conkeror/usr/share/conkeror/xulrunner-stub-1.9.1
80 dh_install -i
82 install-arch:
83 dh_testdir
84 dh_testroot
85 dh_prep -s
86 dh_installdirs -s
88 # Add here commands to install the arch part of the package into
89 # debian/tmp.
90 cp -p conkeror-spawn-helper $(CURDIR)/debian/conkeror-spawn-process-helper/usr/lib/conkeror/
91 ln -s /usr/lib/conkeror/conkeror-spawn-helper $(CURDIR)/debian/conkeror-spawn-process-helper/usr/share/conkeror/
93 dh_install -s
95 # Must not depend on anything. This is to be called by
96 # binary-arch/binary-indep in another 'make' thread.
97 binary-common:
98 dh_testdir
99 dh_testroot
100 dh_installchangelogs
101 dh_installdocs
102 # dh_installexamples
103 dh_installmenu
104 # dh_installemacsen
105 dh_installman
106 dh_link
107 dh_strip
108 dh_compress
109 dh_fixperms
110 dh_makeshlibs
111 dh_installdeb
112 dh_shlibdeps
113 dh_gencontrol
114 dh_md5sums
115 dh_builddeb
117 # Build architecture independant packages using the common target.
118 binary-indep: build-indep install-indep
119 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
121 # Build architecture dependant packages using the common target.
122 binary-arch: build-arch install-arch
123 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
125 binary: binary-arch binary-indep
126 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure