File: rules

package info (click to toggle)
gnumeric 1.12.44-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 112,672 kB
  • sloc: ansic: 293,830; xml: 56,297; perl: 6,093; sh: 4,527; makefile: 2,940; yacc: 1,341; python: 384
file content (133 lines) | stat: -rwxr-xr-x 4,175 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
#! /usr/bin/make -f

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

include /usr/share/dpkg/pkg-info.mk
$(info I: DEB_VERSION_UPSTREAM=$(DEB_VERSION_UPSTREAM))

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

# Make the linker work a bit harder so dynamic loading can be done faster.
#LDFLAGS += -Wl,-O1

# minimise needless linking
# Make the linker only include actual dependencies on libraries, rather than
# for all libraries specified in the link line.
#LDFLAGS += -Wl,--as-needed

export DEB_LDFLAGS_MAINT_APPEND= -Wl,-O1 -Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

## reproducible build: embedded gzip timestamps (#784672):
export SOURCE_DATE_EPOCH

CFLAGS += -Wall -g

%:
	dh $@ --with autoreconf,python2,gir

override_dh_autoreconf:
	debconf-updatepo -v
	dh_autoreconf --as-needed

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

# Spreadsheet indexer for beagle
features+= --enable-ssindex

# Plugins to access databases through the GDA framework.
# The GnomeDB plugin for gnumeric requires a version of GnomeDB that is not
# available as packages yet. [Tue, 01 Sep 2009 20:49:41 +0200]
features+= --without-gda

# Psion files support?
features+= --without-psiconv

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

# Perl plugin
features+= --with-perl

# The Python plugin
features+= PYTHON=/usr/bin/python --with-python

# Don't build a PDF of the documentation.
features+= --disable-pdfdocs
## Enable it for my development tree:
#features+= --enable-pdfdocs

confflags := --prefix=/usr \
             --mandir=\$${prefix}/share/man \
             --sysconfdir=/etc \
             --localstatedir=/var/lib \
             --libdir=/usr/lib \
             --libexecdir=/usr/bin \
             --enable-compile-warnings=minimum \
             --enable-introspection=yes \
             --disable-silent-rules \
             --disable-maintainer-mode \
             $(features)
override_dh_auto_configure:
	dh_auto_configure -- "CC=$(CC) $(LDFLAGS)" "CFLAGS=$(CFLAGS)" \
            $(confflags)

override_dh_auto_test:
	## do not stop on failed tests
	-dh_auto_test
#	-HOME="$(CURDIR)/debian/tmp" \
#        xvfb-run --server-args="-screen 0 640x480x24 +extension RANDR" dh_auto_test -v --max-parallel=1
#        dbus-run-session --
#	PATH="$(CURDIR)/src:$$PATH" \
#        XDG_RUNTIME_DIR="$(CURDIR)/debian/tmp" \

override_dh_auto_install:
	GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 \
        dh_auto_install --destdir=$(CURDIR)/debian/tmp -- \
            localstatedir=$(CURDIR)/debian/tmp/var/lib \
            libexecdir=$(CURDIR)/debian/tmp/usr/bin \
            scrollkeeper_localstate_dir=/var/lib/scrollkeeper
	# Removing *.la files
	find $(CURDIR)/debian/tmp -name '*.la' -delete -printf 'removing %p\n'
	# Removing *.ico files
	find $(CURDIR)/debian/tmp -name '*.ico' -delete -printf 'removing %p\n'
	# Plugins are not intended as stand-alone executables
	find $(CURDIR)/debian/tmp/usr/lib/*/*/plugins -type f -executable \
            -printf 'removing executable flag from %p\n' -exec chmod a-x '{}' \;

override_dh_install:
	dh_buildinfo
	dh_install
	# Rename the binary just "gnumeric"
	if [ -d "debian/gnumeric/usr/bin" ]; then \
              cd debian/gnumeric/usr/bin \
           && mv -v gnumeric-* gnumeric ;\
        fi
	#
	# 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) -rv debian/gnumeric/$$l ; \
        done < debian/gnumeric-plugins-extra.install
	#
	# Wipe empty dirs if any
	find $(CURDIR)/debian -type d -empty -delete -printf 'removing %p\n'

debian/gnumeric.preinst: debian/gnumeric.preinst.in
	sed -r 's/@DEB_VERSION_UPSTREAM@/$(DEB_VERSION_UPSTREAM)/g' $< > $@

override_dh_installdeb: debian/gnumeric.preinst
	dh_installdeb

override_dh_gencontrol:
	dh_gencontrol -v -- -VUpstream-Version=$(DEB_VERSION_UPSTREAM)

override_dh_builddeb:
	dh_builddeb -- -Zxz