File: rules

package info (click to toggle)
gnumeric 1.12.18-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 103,816 kB
  • ctags: 25,022
  • sloc: ansic: 278,696; xml: 54,477; sh: 11,677; perl: 4,216; makefile: 2,751; yacc: 1,324; python: 203
file content (124 lines) | stat: -rwxr-xr-x 3,958 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
#! /usr/bin/make -f

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

# 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

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

CFLAGS += -Wall -g

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

override_dh_autoreconf:
	convert -monitor icons/32x32/gnumeric.png  debian/gnome-gnumeric.xpm
	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

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"
	cd debian/gnumeric/usr/bin \
        && mv -v gnumeric-* gnumeric
	#
	# 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'

override_dh_link:
	# Make the documentation accessible to gnumeric
	dh_link -pgnumeric-doc \
            usr/share/xml/docbook/stylesheet/nwalsh/images  usr/share/gnumeric/$(UVER)/doc/C/images \
            usr/share/gnome/help/gnumeric  usr/share/gnumeric/$(UVER)/doc

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

override_dh_builddeb:
	dh_builddeb -- -Zxz