File: rules

package info (click to toggle)
poppler 0.48.0-2%2Bdeb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 17,896 kB
  • sloc: cpp: 167,913; ansic: 7,870; sh: 4,271; makefile: 1,498; python: 35
file content (81 lines) | stat: -rwxr-xr-x 2,228 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
#!/usr/bin/make -f

# the upstream version (i.e. without the Debian revision)
UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | cut -f1 -d '-')
# symbols.in files & their "generated" file names
SYMBOLS_in := $(wildcard debian/*.symbols.in)
SYMBOLS_generated := $(patsubst %.in,%,$(SYMBOLS_in))

# use qt4's moc as the default moc is qt3's when both are installed
PATH := /usr/share/qt4/bin:$(PATH)
export PATH

# avoid overlinking and reduce library dependencies
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

# make the build verbose
export V=1

# enable all the hardening options
# pie is disabled because of incompatibility with Qt5 and GCC >= 5 (#792592)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie

# DEB_* variables
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# disable gtk stuff to minimize Build-Depends
CONFIGURE_ARGS :=				\
	--enable-libjpeg			\
	--enable-libpng				\
	--enable-libtiff			\
	--enable-splash-output			\
	--enable-cairo-output			\
	--enable-poppler-glib			\
	--enable-poppler-qt4			\
	--enable-poppler-qt5			\
	--enable-poppler-cpp			\
	--enable-gtk-doc			\
	--enable-xpdf-headers			\
	--enable-introspection=yes		\
	--enable-cms=lcms2			\
	--enable-libopenjpeg=openjpeg2		\
	--disable-gtk-test

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

override_dh_auto_clean:
	dh_auto_clean
	rm -f glib/reference/html/*
	rm -f $(SYMBOLS_generated)

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_ARGS)

override_dh_auto_install:
	dh_auto_install
	# remove libtool .la files
	rm -f -v $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.la

override_dh_install:
	dh_install --list-missing

override_dh_installchangelogs:
	dh_installchangelogs -plibpoppler64
	dh_installchangelogs --remaining-packages -XChangeLog

override_dh_strip:
	dh_strip --dbg-package=poppler-dbg

override_dh_makeshlibs: $(SYMBOLS_generated)
	dh_makeshlibs -plibpoppler64 -V
	dh_makeshlibs -plibpoppler-cpp0v5 -V"libpoppler-cpp0v5 (>= 0.46.0)"
	dh_makeshlibs --remaining-packages

debian/%.symbols: debian/%.symbols.in
	cat $^ | sed -e 's/#CURVER#/$(UPSTREAM_VERSION)/g' > $@

.PHONY: override_dh_auto_test