Rev 7 | Rev 12 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7 | Rev 8 | ||
---|---|---|---|
Line 21... | Line 21... | ||
21 | 21 | ||
22 | ifeq (,$(DEB_BUILD_ARCH)) |
22 | ifeq (,$(DEB_BUILD_ARCH)) |
23 | DEB_BUILD_ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
23 | DEB_BUILD_ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
24 | endif |
24 | endif |
25 | 25 | ||
26 | CFLAGS_EXTRA = -g |
- | |
27 | CPPFLAGS_EXTRA = -DDEBIAN |
26 | CPPFLAGS_EXTRA = -DDEBIAN |
28 | 27 | ||
29 | ifdef SSP |
28 | ifdef SSP |
30 | SSP_FLAGS=-fstack-protector |
29 | SSP_FLAGS=-fstack-protector |
31 | endif |
30 | endif |
32 | 31 | ||
33 | CFARGSEXTRA = --with-cdebug |
- | |
34 | - | ||
35 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
32 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
36 | CFARGSEXTRA += --without-copt |
33 | CFARGSEXTRA=--without-rtldebug --without-cdebug --without-debug --without-copt |
37 | else |
34 | else |
38 | CFARGSEXTRA += --with-copt |
35 | CFARGSEXTRA=--without-rtldebug --without-cdebug --without-debug |
39 | endif |
36 | endif |
40 | 37 | ||
41 | ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
38 | ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
42 | CFARGSEXTRA += --with-rtldebug |
- | |
43 | else |
- | |
44 | CFARGSEXTRA += --without-rtldebug |
39 | CFARGSEXTRA += --with-rtldebug --with-cdebug --with-debug |
45 | endif |
40 | endif |
46 | 41 | ||
47 | CFLAGS_EXTRA += $(SSP_FLAGS) |
42 | CFLAGS_EXTRA += $(SSP_FLAGS) |
48 | # Temporary workaround for hppa linker issues |
43 | # Temporary workaround for hppa linker issues |
49 | ifeq ($(DEB_BUILD_ARCH),hppa) |
44 | ifeq ($(DEB_BUILD_ARCH),hppa) |
Line 84... | Line 79... | ||
84 | ifneq ($(VERSION),$(DEBVERSION)) |
79 | ifneq ($(VERSION),$(DEBVERSION)) |
85 | $(error Version mismatch; buildid.txt: $(VERSION), debian/changelog: $(DEBVERSION)) |
80 | $(error Version mismatch; buildid.txt: $(VERSION), debian/changelog: $(DEBVERSION)) |
86 | endif |
81 | endif |
87 | 82 | ||
88 | CFARGS=$(CFARGSEXTRA) \ |
83 | CFARGS=$(CFARGSEXTRA) \ |
89 | --with-cflags=\\'$(CFLAGS_EXTRA)\\' \ |
84 | --with-cflags="$(CFLAGS_EXTRA)" \ |
90 | --with-cppflags=\\'$(CPPFLAGS_EXTRA)\\' \ |
85 | --with-cppflags="$(CPPFLAGS_EXTRA)" \ |
91 | --with-bignums \ |
86 | --with-bignums \ |
92 | --with-gmp \ |
87 | --with-gmp \ |
93 | --with-poll \ |
88 | --with-poll \ |
94 | --with-zlib \ |
89 | --with-zlib \ |
95 | --with-freetype \ |
90 | --with-freetype \ |
Line 98... | Line 93... | ||
98 | --without-sybase \ |
93 | --without-sybase \ |
99 | --without-java \ |
94 | --without-java \ |
100 | --with-odbc \ |
95 | --with-odbc \ |
101 | --with-sane \ |
96 | --with-sane \ |
102 | --with-postgres \ |
97 | --with-postgres \ |
103 | --with-postgres-include-dir=`pg_config --includedir` \ |
98 | --with-postgres-include-dir=/usr/include/postgresql \ |
104 | --with-libpq-dir=/usr/lib \ |
99 | --with-libpq-dir=/usr/lib \ |
105 | --with-perl \ |
100 | --with-perl \ |
106 | --without-ffmpeg \ |
101 | --without-ffmpeg \ |
107 | --without-fftw \ |
- | |
108 | --without-libpdf \ |
102 | --without-libpdf \ |
109 | --without-libpanda \ |
103 | --without-libpanda \ |
110 | --without-GTK \ |
104 | --without-GTK \ |
111 | --without-GTK2 \ |
105 | --without-GTK2 \ |
112 | --without-bundles \ |
- | |
113 | $(MACHINE_OPTS) $(EXTRA_ARGS) |
106 | $(MACHINE_OPTS) $(EXTRA_ARGS) |
114 | 107 | ||
115 | include_prefix=/usr/include/pike/$(VERSION) |
108 | include_prefix=/usr/include/pike/$(VERSION) |
116 | lib_prefix=/usr/lib/pike/$(VERSION) |
109 | lib_prefix=/usr/lib/pike/$(VERSION) |
117 | 110 | ||
118 | MODULE_PACKAGES=$(shell dh_listpackages -a -N $(PIKE)-core -N $(PIKE)-dev) |
111 | MODULE_PACKAGES=$(shell dh_listpackages -a -N $(PIKE)-core -N $(PIKE)-dev) |
119 | #{ADT,Array,Audio,Cache,Calendar,Calendar_I,COM,Colors,CommonLog,Crypto,Debug,Filesystem,Error,Float,Function,Geography,Getopt,Gettext,Gmp,Graphics,Gz,HTTPAccept,Int,Kerberos,Languages,Local,Locale,Mapping,Math,MIME,Mird,Multiset,Nettle,Parser,Pike,Pipe,Process,Program,Protocols,Regexp,Remote,SSL,Shuffler,Standards,Stdio,String,System,Thread,Tools,Unicode,Web,Yabu,Yp,_ADT,_Charset,_Roxen,___Gz,___MIME,___Math,___Mird,___Regexp,___Yp,____Charset,__builtin*,spider}. |
112 | #{ADT,Array,Audio,Cache,Calendar,Calendar_I,COM,Colors,CommonLog,Crypto,Debug,Filesystem,Error,Float,Function,Geography,Getopt,Gettext,Gmp,Graphics,Gz,HTTPAccept,Int,Kerberos,Languages,Local,Locale,Mapping,Math,MIME,Mird,Multiset,Nettle,Parser,Pike,Pipe,Process,Program,Protocols,Regexp,Remote,SSL,Shuffler,Standards,Stdio,String,System,Thread,Tools,Unicode,Web,Yabu,Yp,_ADT,_Charset,_Roxen,___Gz,___MIME,___Math,___Mird,___Regexp,___Yp,____Charset,__builtin*,spider}. |
120 | #usr/lib/pike/*/modules/Sql.pmod/{module,Sql,rsql,sql_*}.* |
113 | #usr/lib/pike/*/modules/Sql.pmod/{module,Sql,rsql,sql_*}.* |
121 | 114 | ||
122 | excluded_modules:=Ssleay Mird Msql msql PDF Ffmpeg Oracle oracle sybase Gnome GTK GDK DVB Java TTF |
115 | excluded_modules:=Ssleay Msql msql PDF Ffmpeg Oracle oracle sybase Gnome GTK GDK DVB Java TTF |
123 | # This is tricky. Note that it's only possible for an exclusion to match the last |
116 | # This is tricky. Note that it's only possible for an exclusion to match the last |
124 | # component specified in an .install file or on the command line, and below. |
117 | # component specified in an .install file or on the command line, and below. |
125 | DH_EXCLUDE:=$(addprefix -X,$(excluded_modules)) |
118 | DH_EXCLUDE:=$(addprefix -X,$(excluded_modules)) |
126 | DH_ALREADY=`for p in $(MODULE_PACKAGES); do \ |
119 | DH_ALREADY=`for p in $(MODULE_PACKAGES); do \ |
127 | find debian/$$p/usr/lib/pike/*/* -type f -printf "-X%P "; done` |
120 | find debian/$$p/usr/lib/pike/*/* -type f -printf "-X%P "; done` |
128 | 121 | ||
129 | TMP=$(CURDIR)/debian/tmp |
122 | TMP=$(CURDIR)/debian/tmp |
130 | 123 | ||
131 | #export CFLAGS CC PIKE VERSION |
124 | export CFLAGS CC PIKE VERSION |
132 | export CC |
- | |
133 | 125 | ||
134 | build-arch: build-arch-stamp |
126 | build-arch: build-arch-stamp |
135 | build-arch-stamp: $(DPATCH_STAMPFN) |
127 | build-arch-stamp: $(DPATCH_STAMPFN) |
136 | dh_testdir |
128 | dh_testdir |
137 | 129 | ||
Line 156... | Line 148... | ||
156 | dh_testdir |
148 | dh_testdir |
157 | dh_testroot |
149 | dh_testroot |
158 | rm -f build-stamp build-arch-stamp build-indep-stamp configure-stamp |
150 | rm -f build-stamp build-arch-stamp build-indep-stamp configure-stamp |
159 | 151 | ||
160 | # Add here commands to clean up after the build process. |
152 | # Add here commands to clean up after the build process. |
161 | $(MAKE) distclean |
153 | -$(MAKE) distclean |
162 | rm -rf refdoc/modref refdoc/traditional_manual |
154 | rm -rf refdoc/modref refdoc/traditional_manual |
163 | 155 | ||
164 | install: DH_OPTIONS= |
156 | install: DH_OPTIONS= |
165 | install: build-arch |
157 | install: build-arch |
166 | dh_testdir |
158 | dh_testdir |
Line 193... | Line 185... | ||
193 | -e 's@#! */usr/bin/env.*pike@#!/usr/bin/$(PIKE)@' \ |
185 | -e 's@#! */usr/bin/env.*pike@#!/usr/bin/$(PIKE)@' \ |
194 | $$f; \ |
186 | $$f; \ |
195 | fi; \ |
187 | fi; \ |
196 | done |
188 | done |
197 | 189 | ||
198 | # Don't install our own specs file - the ordinary one is not that bad really |
190 | # Install the specs file |
199 | # sed -e 's/@PIKEVERSION@/$(VERSION)/g' \ |
191 | sed -e 's/@PIKEVERSION@/$(VERSION)/g' \ |
200 | -e 's;@CONFIGURE_ARGS@;$(CFARGS);g' \ |
192 | -e 's;@CONFIGURE_ARGS@;$(CFARGS);g' \ |
201 | debian/specs.in > $(TMP)$(include_prefix)/specs |
193 | < debian/specs.in > $(TMP)$(include_prefix)/specs |
202 | 194 | ||
203 | # Install pike-config |
195 | # Install pike-config |
204 | sed -e "s#@CFLAGS@#-I$(include_prefix)#;s/@LDFLAGS@//" \ |
196 | sed -e "s#@CFLAGS@#$(include_prefix)#;s/@LDFLAGS@//" \ |
205 | -e "s/@MAJOR@/$(MAJOR)/;s/@MINOR@/$(MINOR)/;s/@BUILD@/$(BUILD)/" \ |
197 | -e "s/@MAJOR@/$(MAJOR)/;s/@MINOR@/$(MINOR)/;s/@BUILD@/$(BUILD)/" \ |
206 | debian/pike-config.in > $(TMP)/usr/bin/$(PIKE)-config |
198 | debian/pike-config.in > $(TMP)/usr/bin/$(PIKE)-config |
207 | 199 | ||
208 | # # pike -x module fix |
200 | # # pike -x module fix |
209 | sed -i -e 's;\$$(MODULE_BASE)/dynamic_module_makefile;\$$(PIKE_SRC_DIR)/dynamic_module_makefile;g' \ |
201 | sed -i -e 's;\$$(MODULE_BASE)/dynamic_module_makefile;\$$(PIKE_SRC_DIR)/dynamic_module_makefile;g' \ |
Line 217... | Line 209... | ||
217 | # install the docs |
209 | # install the docs |
218 | dh_install -p$(PIKE)-manual refdoc/traditional_manual/* usr/share/doc/$(PIKE)-doc/html/manual |
210 | dh_install -p$(PIKE)-manual refdoc/traditional_manual/* usr/share/doc/$(PIKE)-doc/html/manual |
219 | dh_install -p$(PIKE)-reference refdoc/modref/* usr/share/doc/$(PIKE)-doc/html/reference |
211 | dh_install -p$(PIKE)-reference refdoc/modref/* usr/share/doc/$(PIKE)-doc/html/reference |
220 | dh_install -i -N$(PIKE)-manual -N$(PIKE)-reference --sourcedir=$(TMP) |
212 | dh_install -i -N$(PIKE)-manual -N$(PIKE)-reference --sourcedir=$(TMP) |
221 | dh_installdocs -i |
213 | dh_installdocs -i |
222 | dh_installchangelogs -i -k CHANGES |
214 | dh_installchangelogs -i |
223 | dh_link -i |
215 | dh_link -i |
224 | dh_compress -i |
216 | dh_compress -i |
225 | dh_fixperms -i |
217 | dh_fixperms -i |
226 | dh_installdeb -i |
218 | dh_installdeb -i |
227 | dh_gencontrol -i |
219 | dh_gencontrol -i |
Line 231... | Line 223... | ||
231 | # Build architecture-dependent files here. |
223 | # Build architecture-dependent files here. |
232 | binary-arch: build-arch install |
224 | binary-arch: build-arch install |
233 | dh_testdir -a |
225 | dh_testdir -a |
234 | dh_testroot -a |
226 | dh_testroot -a |
235 | # dh_installdebconf -a |
227 | # dh_installdebconf -a |
236 | dh_install -a -N$(PIKE)-core --sourcedir=debian/tmp $(DH_EXCLUDE) |
228 | dh_install -a --sourcedir=debian/tmp -N$(PIKE)-core $(DH_EXCLUDE) |
237 | dh_install -p$(PIKE)-core --sourcedir=debian/tmp $(DH_EXCLUDE) $(DH_ALREADY) |
229 | dh_install -p$(PIKE)-core --sourcedir=debian/tmp $(DH_EXCLUDE) $(DH_ALREADY) |
238 | for p in $(MODULE_PACKAGES) $(PIKE)-dev; do \ |
230 | for p in $(MODULE_PACKAGES); do \ |
239 | dh_link -p$$p usr/share/doc/$(PIKE)-core usr/share/doc/$$p; \ |
231 | dh_link -p$$p usr/share/doc/$(PIKE)-core usr/share/doc/$$p; \ |
240 | done |
232 | done |
241 | dh_installdocs -a |
233 | dh_installdocs -a |
242 | dh_installmenu -a |
234 | dh_installmenu -a |
243 | # dh_installman -a |
235 | # dh_installman -a |
244 | dh_installchangelogs -a -k CHANGES |
236 | dh_installchangelogs -a |
245 | dh_strip -a |
237 | dh_strip -a |
246 | dh_compress -a |
238 | dh_compress -a |
247 | dh_fixperms -a -X/run_autoconfig -X/precompile.sh -X/smartlink -X/fixdepends.sh -X/install_module -X/mktestsuite |
239 | dh_fixperms -a -X/run_autoconfig -X/precompile.sh -X/smartlink -X/fixdepends.sh -X/install_module -X/mktestsuite |
248 | dh_installdeb -a |
240 | dh_installdeb -a |
249 | dh_shlibdeps -a |
241 | dh_shlibdeps -a |