Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 39 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 39 Rev 41
Line 9... Line 9...
9
# $Id: rules,v 1.64 2006/08/05 15:49:18 grendel Exp $
9
# $Id: rules,v 1.64 2006/08/05 15:49:18 grendel Exp $
10
#
10
#
11
11
12
# Uncomment this to turn on verbose mode. 
12
# Uncomment this to turn on verbose mode. 
13
#export DH_VERBOSE=1
13
#export DH_VERBOSE=1
-
 
14
14
include /usr/share/dpatch/dpatch.make
15
include /usr/share/dpatch/dpatch.make
15
16
16
ifdef CCVER
17
ifdef CCVER
17
CC=gcc-$(CCVER)
18
CC=gcc-$(CCVER)
18
else
19
else
Line 21... Line 22...
21
22
22
ifeq (,$(DEB_BUILD_ARCH))
23
ifeq (,$(DEB_BUILD_ARCH))
23
DEB_BUILD_ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
24
DEB_BUILD_ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
24
endif
25
endif
25
26
26
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-
 
27
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
 
28
-
 
29
CFLAGS_EXTRA = -g
27
CFLAGS_EXTRA = -g
30
CPPFLAGS_EXTRA = -DDEBIAN
28
CPPFLAGS_EXTRA = -DDEBIAN
31
29
32
ifdef SSP
30
ifdef SSP
33
SSP_FLAGS=-fstack-protector
31
SSP_FLAGS=-fstack-protector
Line 74... Line 72...
74
MACHINE_OPTS=--with-machine-code
72
MACHINE_OPTS=--with-machine-code
75
else
73
else
76
MACHINE_OPTS=--without-machine-code
74
MACHINE_OPTS=--without-machine-code
77
endif
75
endif
78
76
79
DEBVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/Version: *\(.*\)-.*$$/\1/p')
77
#DEBVERSION:=$(shell dpkg-parsechangelog | sed -ne 's/Version: *\(.*\)-.*$$/\1/p')
-
 
78
DEBVERSION:=$(shell dpkg-parsechangelog | grep "Version:" | cut -d" " -f2 | cut -d"-" -f1)
80
MAJOR:=$(shell sed -ne 's/major://p' buildid.txt)
79
MAJOR:=$(shell sed -ne 's/major://p' buildid.txt)
81
MINOR:=$(shell sed -ne 's/minor://p' buildid.txt)
80
MINOR:=$(shell sed -ne 's/minor://p' buildid.txt)
82
BUILD:=$(shell sed -ne 's/build://p' buildid.txt)
81
BUILD:=$(shell sed -ne 's/build://p' buildid.txt)
83
PIKEV:=$(MAJOR).$(MINOR)
82
PIKEV:=$(MAJOR).$(MINOR)
84
VERSION:=$(MAJOR).$(MINOR).$(BUILD)
83
VERSION:=$(MAJOR).$(MINOR).$(BUILD)
Line 103... Line 102...
103
       --with-odbc \
102
       --with-odbc \
104
       --with-sane \
103
       --with-sane \
105
       --with-postgres \
104
       --with-postgres \
106
       --with-postgres-include-dir=`pg_config --includedir` \
105
       --with-postgres-include-dir=`pg_config --includedir` \
107
       --with-libpq-dir=/usr/lib \
106
       --with-libpq-dir=/usr/lib \
108
       --with-perl \
-
 
109
       --without-ffmpeg \
107
       --without-ffmpeg \
110
       --without-fftw \
108
       --without-fftw \
111
       --without-libpdf \
109
       --without-libpdf \
112
       --without-libpanda \
110
       --without-libpanda \
113
       --without-GTK \
111
       --without-GTK \
114
       --without-GTK2 \
112
       --with-GTK2 \
115
       --without-bundles \
113
       --without-bundles \
-
 
114
       --without-oracle \
-
 
115
       --without-dvb \
-
 
116
       --with-sqlite \
-
 
117
       --disable-rpath \
-
 
118
       --disable-smartlink_binary \
-
 
119
       --with-relocatable-dumped-modules \
116
       $(MACHINE_OPTS) $(EXTRA_ARGS)
120
       $(MACHINE_OPTS) $(EXTRA_ARGS)
117
121
118
include_prefix=/usr/include/pike/$(VERSION)
122
include_prefix=/usr/include/pike/$(VERSION)
119
lib_prefix=/usr/lib/pike/$(VERSION)
123
lib_prefix=/usr/lib/pike/$(VERSION)
120
124
121
MODULE_PACKAGES=$(shell dh_listpackages -a -N $(PIKE)-core -N $(PIKE)-dev)
125
MODULE_PACKAGES=$(shell dh_listpackages -a -N $(PIKE)-core -N $(PIKE)-dev)
122
#{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}.
126
#{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}.
123
#usr/lib/pike/*/modules/Sql.pmod/{module,Sql,rsql,sql_*}.*
127
#usr/lib/pike/*/modules/Sql.pmod/{module,Sql,rsql,sql_*}.*
124
128
125
excluded_modules:=Ssleay Mird Msql msql PDF Ffmpeg Oracle oracle sybase Gnome GTK GDK DVB Java TTF
129
excluded_modules:=Ssleay Mird Msql msql PDF Ffmpeg Oracle oracle sybase DVB Java TTF
126
# This is tricky. Note that it's only possible for an exclusion to match the last
130
# This is tricky. Note that it's only possible for an exclusion to match the last
127
# component specified in an .install file or on the command line, and below.
131
# component specified in an .install file or on the command line, and below.
128
DH_EXCLUDE:=$(addprefix -X,$(excluded_modules))
132
DH_EXCLUDE:=$(addprefix -X,$(excluded_modules))
129
DH_ALREADY=`for p in $(MODULE_PACKAGES); do \
133
DH_ALREADY=`for p in $(MODULE_PACKAGES); do \
130
	      find debian/$$p/usr/lib/pike/*/* -type f -printf "-X%P "; done`
134
	      find debian/$$p/usr/lib/pike/*/* -type f -printf "-X%P "; done`
Line 135... Line 139...
135
export CC
139
export CC
136
140
137
build-arch: build-arch-stamp
141
build-arch: build-arch-stamp
138
build-arch-stamp: $(DPATCH_STAMPFN)
142
build-arch-stamp: $(DPATCH_STAMPFN)
139
	dh_testdir
143
	dh_testdir
140
-
 
141
	# Add here command to compile/build the package.
-
 
142
	$(MAKE) compile CONFIGUREARGS="$(CFARGS)"
144
	$(MAKE) compile CONFIGUREARGS="$(CFARGS)"
143
	touch build-arch-stamp
145
	touch build-arch-stamp
144
146
145
build-indep: build-indep-stamp
147
build-indep: build-indep-stamp
146
build-indep-stamp: $(DPATCH_STAMPFN)
148
build-indep-stamp: $(DPATCH_STAMPFN)
147
	dh_testdir
149
	dh_testdir
148
-
 
149
	# Add here command to compile/build the arch indep package.
-
 
150
	$(MAKE) documentation CONFIGUREARGS="$(CFARGS)"
150
	$(MAKE) documentation CONFIGUREARGS="$(CFARGS)"
151
	touch build-indep-stamp
151
	touch build-indep-stamp
152
152
153
build: build-arch
153
build: build-arch
154
154
Line 157... Line 157...
157
157
158
clean-patched:
158
clean-patched:
159
	dh_testdir
159
	dh_testdir
160
	dh_testroot
160
	dh_testroot
161
	rm -f build-stamp build-arch-stamp build-indep-stamp configure-stamp
161
	rm -f build-stamp build-arch-stamp build-indep-stamp configure-stamp
162
-
 
163
	# Add here commands to clean up after the build process.
-
 
164
	$(MAKE) distclean
162
	$(MAKE) distclean
165
	rm -rf refdoc/modref refdoc/traditional_manual
163
	rm -rf refdoc/modref refdoc/traditional_manual
166
164
167
install: DH_OPTIONS=
165
install: DH_OPTIONS=
168
install: build-arch
166
install: build-arch
169
	dh_testdir
167
	dh_testdir
170
	dh_testroot
168
	dh_testroot
171
	dh_clean -k
169
	dh_clean -k
172
-
 
173
	$(MAKE) INSTALLARGS=--traditional \
170
	$(MAKE) INSTALLARGS=--traditional \
174
		buildroot=$(TMP) \
171
		buildroot=$(TMP) \
175
	        prefix=/usr \
172
		prefix=/usr \
176
	        man_prefix=/usr/share/man \
173
		man_prefix=/usr/share/man \
177
	        lib_prefix="$(lib_prefix)" \
174
		lib_prefix="$(lib_prefix)" \
178
		include_prefix="$(include_prefix)" \
175
		include_prefix="$(include_prefix)" \
179
		pike_name=/usr/bin/$(PIKE) \
176
		pike_name=/usr/bin/$(PIKE) \
180
	        install_nodoc
177
		install_nodoc
181
178
182
#	Some cleaning
179
#	Some cleaning
183
	find "$(TMP)$(lib_prefix)" -name '.autodoc' -type f -exec rm -f '{}' ';'
180
	find "$(TMP)$(lib_prefix)" -name '.autodoc' -type f -exec rm -f '{}' ';'
184
181
185
	install -d -m755 $(TMP)/usr/share/pixmaps
182
	install -d -m755 $(TMP)/usr/share/pixmaps
Line 208... Line 205...
208
	    -e "s/@MAJOR@/$(MAJOR)/;s/@MINOR@/$(MINOR)/;s/@BUILD@/$(BUILD)/" \
205
	    -e "s/@MAJOR@/$(MAJOR)/;s/@MINOR@/$(MINOR)/;s/@BUILD@/$(BUILD)/" \
209
	    debian/pike-config.in > $(TMP)/usr/bin/$(PIKE)-config
206
	    debian/pike-config.in > $(TMP)/usr/bin/$(PIKE)-config
210
207
211
# 	# pike -x module fix
208
# 	# pike -x module fix
212
	sed -i -e 's;\$$(MODULE_BASE)/dynamic_module_makefile;\$$(PIKE_SRC_DIR)/dynamic_module_makefile;g' \
209
	sed -i -e 's;\$$(MODULE_BASE)/dynamic_module_makefile;\$$(PIKE_SRC_DIR)/dynamic_module_makefile;g' \
213
		$(TMP)$(include_prefix)/dynamic_module_makefile
210
		$(TMP)$(include_prefix)/modules/dynamic_module_makefile
214
211
215
# Build architecture-independent files here.
212
# Build architecture-independent files here.
216
# Pass -i to all debhelper commands in this target to reduce clutter.
213
# Pass -i to all debhelper commands in this target to reduce clutter.
217
binary-indep: build-indep
214
binary-indep: build-indep
218
	dh_testdir -i
215
	dh_testdir -i
Line 233... Line 230...
233
230
234
# Build architecture-dependent files here.
231
# Build architecture-dependent files here.
235
binary-arch: build-arch install
232
binary-arch: build-arch install
236
	dh_testdir -a
233
	dh_testdir -a
237
	dh_testroot -a
234
	dh_testroot -a
238
#	dh_installdebconf -a
-
 
239
	dh_install -a -N$(PIKE)-core --sourcedir=debian/tmp $(DH_EXCLUDE)
235
	dh_install -a -N$(PIKE)-core --sourcedir=debian/tmp $(DH_EXCLUDE)
240
	dh_install -p$(PIKE)-core --sourcedir=debian/tmp $(DH_EXCLUDE) $(DH_ALREADY)
236
	dh_install -p$(PIKE)-core --sourcedir=debian/tmp $(DH_EXCLUDE) $(DH_ALREADY)
241
	for p in $(MODULE_PACKAGES) $(PIKE)-dev; do \
237
	for p in $(MODULE_PACKAGES) $(PIKE)-dev; do \
242
		dh_link -p$$p usr/share/doc/$(PIKE)-core usr/share/doc/$$p; \
238
		dh_link -p$$p usr/share/doc/$(PIKE)-core usr/share/doc/$$p; \
243
	done
239
	done
244
	dh_installdocs -a
240
	dh_installdocs -a
245
	dh_installmenu -a
241
	dh_installmenu -a
246
#	dh_installman -a
-
 
247
	dh_installchangelogs -a -k CHANGES
242
	dh_installchangelogs -a -k CHANGES
248
	dh_strip -a
243
	dh_strip -a
249
	dh_compress -a
244
	dh_compress -a
250
	dh_fixperms -a -X/run_autoconfig -X/precompile.sh -X/smartlink -X/fixdepends.sh -X/install_module -X/mktestsuite
245
	dh_fixperms -a -X/run_autoconfig -X/precompile.sh -X/smartlink -X/fixdepends.sh -X/install_module -X/mktestsuite
251
	dh_installdeb -a
246
	dh_installdeb -a