File: rules

package info (click to toggle)
poppler 0.71.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 13,016 kB
  • sloc: cpp: 154,300; ansic: 6,800; python: 354; makefile: 42; sh: 17
file content (64 lines) | stat: -rwxr-xr-x 1,876 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
#!/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))

libpopplerN := $(shell sed -rn 's/^Package:[[:space:]]*(libpoppler[0-9]+)[[:space:]]*$$/\1/p' debian/control)

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

# enable all the hardening options
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

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

# disable gtk stuff to minimize Build-Depends
CONFIGURE_ARGS :=				\
	-DCMAKE_BUILD_TYPE=Release		\
	-DCMAKE_C_FLAGS_RELEASE="$(CFLAGS)"	\
	-DCMAKE_CXX_FLAGS_RELEASE="$(CXXFLAGS)"	\
	-DCMAKE_INSTALL_LIBDIR="lib/$(DEB_HOST_MULTIARCH)" \
	-DENABLE_GLIB=ON			\
	-DENABLE_QT5=ON				\
	-DENABLE_CPP=ON				\
	-DENABLE_GTK_DOC=ON			\
	-DENABLE_XPDF_HEADERS=ON		\
	-DENABLE_CMS=lcms2			\
	-DENABLE_LIBOPENJPEG=openjpeg2		\
	-DBUILD_GTK_TESTS=OFF

%:
	dh $@ --with gir

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_missing:
	dh_missing --fail-missing

override_dh_installchangelogs:
	dh_installchangelogs -p$(libpopplerN)
	dh_installchangelogs --remaining-packages -XChangeLog

override_dh_makeshlibs: $(SYMBOLS_generated)
	dh_makeshlibs -p$(libpopplerN) -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