File: rules

package info (click to toggle)
gnumeric 1.4.3-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 71,576 kB
  • ctags: 28,555
  • sloc: ansic: 282,333; xml: 45,788; sh: 8,479; makefile: 3,119; yacc: 1,129; lisp: 200; perl: 173; python: 86
file content (272 lines) | stat: -rwxr-xr-x 7,516 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
#! /usr/bin/make -f
# Based on the sample debian/rules that uses debhelper. 
# GNU copyright 1997 by Joey Hess.

#DEB_BUILD_OPTIONS?="debug nostrip"
export DEB_BUILD_OPTIONS

export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_TYPE),m68k-linux)
	DEB_BUILD_OPTIONS+=noopt
endif

# Uncomment this to turn on verbose mode. 
#export DH_VERBOSE=1

# This is the debhelper compatability version to use.
export DH_COMPAT=4

# Try to preserve timestamps as much as possible
export INSTALL=/usr/bin/install -p

# Are we building a release version, or are we doing development?
CVS_BUILD=$(shell test ! -d CVS; echo $$?)

upstreamversion=$(shell dpkg-parsechangelog | grep Version | head -1 | sed -e 's/Version: //g' -e 's/-[A-Za-z0-9\.]*$$//g')

# Features configuration
# ---------------------- 
#
# We're aiming for a package that's stable, with as much functionality as is
# reasonably possible.

features:=

# The Python support offers a nice way to extend gnumeric's functionality.

features+= --with-python=yes

# Bonobo allows us to use parts of other applications as components via
# CORBA, and was supposed to allow us to work as a component for other
# applications. However, that promise hasn't really been realised and
# according to Morten Welinder "drop bonobo from your build.  it's
# pointless."

features+= --without-bonobo

# Plugin to access databases through the GDA framework.

features+= --with-gda

# Guile offers an additional way to extension gnumeric, but the guile
# support is for guile 1.5 or newer, which is not currently available in
# Debian.

features+= --without-guile

# configure.in: "Gnome Basic is extremely API unstable; it is likely that
# gnumeric will only build with the single version mentioned in
# configure.in, if at all. It is possible, but unlikely, that Gnome Basic
# contains security vulnerabilities."

features+= --without-gb

# Paradox database files plugin
features+= --with-paradox

confflags :=	--prefix=/usr --sysconfdir=/etc \
		--localstatedir=/var/lib \
		--libexecdir=/usr/bin \
                --enable-compile-warnings=minimum \
		$(features)

ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
	confflags += --build $(DEB_HOST_GNU_TYPE)
else
	confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

confflags += LDFLAGS="-Wl,-O1"

source-updates:
	rm -f configure-stamp
	# Update files generated by autotools
	env srcdir=`pwd` NOCONFIGURE=1 \
		LIBTOOLIZE="libtoolize --copy" \
		INTLTOOLIZE="intltoolize --copy" \
		sh autogen.sh $(confflags)

configure: configure-stamp
configure-stamp:
	dh_testdir

	# Prepare for build
	 
	mkdir build
	cd build && env srcdir=`pwd`/.. \
		../configure $(confflags)

	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir

	cd build && $(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp debian/*substvars debian/*~ \
		debian/buildinfo

	rm -rf debian/tmp build

	# Update config.{sub,guess} from autotools-dev, if possible.
	-for f in config.sub config.guess ; do \
		if test -r /usr/share/misc/$$f ; then \
			OLDDATE=`./$$f -t | tr -d -` ; \
			NEWDATE=`/usr/share/misc/$$f -t | tr -d -` ; \
			if [ $$OLDDATE -lt $$NEWDATE ] ; then \
				echo "GNU config automated update of $$f (replacing $$OLDDATE with $$NEWDATE)" 1>&2 ; \
				cp -f /usr/share/misc/$$f $$f ; \
			fi; \
		fi; \
	done

	-find -type f -name 'Makefile.in' | sed -e 's/\.in$$//' | xargs rm -f
	-rm -f po/*.gmo

	# Clean out files generated as part of the documentation generation
	-rm -f doc/C/index.html doc/C/gnumeric.html doc/C/ld-id*.html \
		omf-install/gnumeric-C.omf
	-rm -rf doc/C/gnumeric doc/C/DBTOHTML_OUTPUT_DIR*

	-rm -rf aclocal.m4 config.h.in stamp-h.in autom4te.cache \
		doc/C/gnumeric.junk

	-rm -f GNOME_Gnumeric.server.in GNOME_Gnumeric.server src/gnumeric-paths.h

	dh_clean

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	cd build && env GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 \
		RPM_BUILD_ROOT=fake_so_scrollkeeper-update_wont_be_called \
		$(MAKE) install \
		DESTDIR=`pwd`/../debian/tmp/ \
		localstatedir=`pwd`/../debian/tmp/var/lib \
		libexecdir=`pwd`/../debian/tmp/usr/bin

	# Plugins are not intended as stand-alone executables
	find `pwd`/debian/tmp/usr/lib/gnumeric/*/plugins -type f -print0 | xargs -0 chmod a-x

	# Remove unwanted files: static libraries and documentation sources
	find `pwd`/debian/tmp/usr/ -name '*.a' -print0 | xargs -0 rm -f
	find `pwd`/debian/tmp/ -name '*.sgml' -print0 | xargs -0 rm -f
	# Bonobo-only files
	rm -rf debian/tmp/usr/lib/bonobo

	# Remove scrollkeeper generated files as well; for a package they
	# need to be (re)generated at package (de)install time.
	rm -rf `pwd`/debian/tmp/var/lib/scrollkeeper

	# Low-colour icon for use by the menu system
	$(INSTALL) -m 644 debian/gnome-gnumeric.xpm `pwd`/debian/tmp/usr/share/pixmaps/

	dh_install --sourcedir=`pwd`/debian/tmp --list-missing

	# Name the binary just "gnumeric"
	cd debian/gnumeric/usr/bin && mv gnumeric-* gnumeric

	dh_link usr/share/gnumeric/$(upstreamversion)/idl/GNOME_Gnumeric.idl usr/share/idl/GNOME_Gnumeric.idl

	# Make the documentation accessible to yelp
	dh_link -pgnumeric-doc usr/share/gnumeric/$(upstreamversion)/doc usr/share/gnome/help/gnumeric 

	dh_link -pgnumeric-doc usr/share/xml/docbook/stylesheet/nwalsh/images/ usr/share/gnumeric/$(upstreamversion)/doc/C/images

	# Remove files from the main package that belong to a more
	# specialist package
	# (dh_install doesn't do the right thing here IMO; perhaps it
	# doesn't like multiple globs in one line)
	while read l ; do \
		rm -rvf debian/gnumeric/$$l ; \
	done < debian/gnumeric-plugins-extra.install

	# Remove dirs that are now empty
	-find debian/gnumeric -type d -depth | xargs rmdir >/dev/null 2>&1

# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
#	dh_installdebconf -i
	dh_installdocs -i

	dh_installexamples -i
	dh_installmenu -i
#	dh_installlogrotate -i
#	dh_installemacsen -i
#	dh_installpam -i
	dh_installmime -i
#	dh_installinit -i
	dh_installcron -i
#	dh_installman -i
	dh_link -i
	dh_installinfo -i
#	dh_undocumented -i
	dh_installchangelogs ChangeLog -i
	dh_gconf -i
	dh_scrollkeeper -i
	dh_desktop -i
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
#	dh_perl -i
	dh_gencontrol -v -i -- -VUpstream-Version=$(upstreamversion)
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
#	dh_installdebconf -a
	dh_installdocs -a --noscripts
	rm -rf `pwd`/debian/gnumeric-doc/usr/share/doc-base
	dh_installexamples -a
	dh_installmenu -a
#	dh_installlogrotate -a
#	dh_installemacsen -a
#	dh_installpam -a
	dh_installmime -a
#	dh_installinit -a
	dh_installcron -a
	dh_installman -a
	dh_link -a
	dh_installinfo -a
#	dh_undocumented -a
	dh_installchangelogs ChangeLog -a
	dh_gconf -a
	dh_scrollkeeper -a
	dh_desktop -a
	dh_strip -a
	dh_link -a
	dh_compress -a

	dh_buildinfo

	dh_fixperms -a
#	dh_makeshlibs -a
	dh_installdeb -a
#	dh_perl -a

	dh_shlibdeps -v -a

	dh_gencontrol -v -a -- -VUpstream-Version=$(upstreamversion)
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure