comparison debian/rules @ 173:d9393349ab29

new debianization from hggdh
author Carl Byington <carl@five-ten-sg.com>
date Sat, 04 Apr 2009 19:23:33 -0700
parents 535075b4d261
children 9bbc834d5f3e
comparison
equal deleted inserted replaced
172:6954d315aaa8 173:d9393349ab29
1 #!/usr/bin/make -f 1 #!/usr/bin/make -f
2 # -*- makefile -*- 2 include /usr/share/cdbs/1/rules/debhelper.mk
3 # Sample debian/rules that uses debhelper. 3 include /usr/share/cdbs/1/class/autotools.mk
4 # 4 include /usr/share/cdbs/1/rules/simple-patchsys.mk
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 #
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets by Bill Allombert 2001
12 5
13 # Uncomment this to turn on verbose mode. 6 export DH_VERBOSE=1
14 #export DH_VERBOSE=1 7 DEB_CONFIGURE_EXTRA_FLAGS = --enable-libpst-shared
15
16 # This has to be exported to make some magic below work.
17 export DH_OPTIONS
18
19 # These are used for cross-compiling and for saving the configure script
20 # from having to guess our platform (since we know it already)
21 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
22 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
23
24
25 CFLAGS = -Wall -g
26
27 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
28 CFLAGS += -O0
29 else
30 CFLAGS += -O2
31 endif
32
33 config.status: configure
34 dh_testdir
35 # Add here commands to configure the package.
36 ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
37
38
39 #Architecture
40 build: build-arch build-indep
41
42 build-arch: build-arch-stamp
43 build-arch-stamp: config.status
44
45 # Add here commands to compile the arch part of the package.
46 #$(MAKE)
47 touch $@
48
49 build-indep: build-indep-stamp
50 build-indep-stamp: config.status
51
52 # Add here commands to compile the indep part of the package.
53 #$(MAKE) doc
54 touch $@
55
56 clean:
57 dh_testdir
58 dh_testroot
59 rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
60
61 # Add here commands to clean up after the build process.
62 -$(MAKE) distclean
63 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
64 cp -f /usr/share/misc/config.sub config.sub
65 endif
66 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
67 cp -f /usr/share/misc/config.guess config.guess
68 endif
69
70
71 dh_clean
72
73 install: install-indep install-arch
74 install-indep:
75 dh_testdir
76 dh_testroot
77 dh_clean -k -i
78 dh_installdirs -i
79
80 # Add here commands to install the indep part of the package into
81 # debian/<package>-doc.
82 #INSTALLDOC#
83
84 dh_install -i
85
86 install-arch:
87 dh_testdir
88 dh_testroot
89 dh_clean -k -s
90 dh_installdirs -s
91
92 # Add here commands to install the arch part of the package into
93 # debian/tmp.
94 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
95
96 dh_install -s --list-missing --sourcedir=$(CURDIR)/debian/tmp
97 # Must not depend on anything. This is to be called by
98 # binary-arch/binary-indep
99 # in another 'make' thread.
100 binary-common:
101 dh_testdir
102 dh_testroot
103 dh_installchangelogs ChangeLog
104 dh_installdocs
105 dh_installexamples
106 # dh_installmenu
107 # dh_installdebconf
108 # dh_installlogrotate
109 # dh_installemacsen
110 # dh_installpam
111 # dh_installmime
112 # dh_python
113 # dh_installinit
114 # dh_installcron
115 dh_installinfo
116 dh_installman
117 dh_link
118 dh_strip
119 dh_compress
120 dh_fixperms
121 # dh_perl
122 dh_makeshlibs -V
123 dh_installdeb
124 dh_shlibdeps -L libpst -l debian/tmp/usr/lib
125 dh_gencontrol
126 dh_md5sums
127 dh_builddeb
128 # Build architecture independant packages using the common target.
129 binary-indep: build-indep install-indep
130 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
131
132 # Build architecture dependant packages using the common target.
133 binary-arch: build-arch install-arch
134 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
135
136 binary: binary-arch binary-indep
137 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch