File: rules

package info (click to toggle)
gnutls28 3.5.8-5+deb9u4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 61,836 kB
  • sloc: ansic: 252,935; asm: 69,023; sh: 10,249; makefile: 6,192; yacc: 1,791; lisp: 1,492; cpp: 1,155; perl: 935; sed: 16
file content (102 lines) | stat: -rwxr-xr-x 3,217 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
#! /usr/bin/make -f
# Build the gnutls package for Debian.

export DEB_BUILD_MAINT_OPTIONS := hardening=+bindnow
export DEB_CFLAGS_MAINT_APPEND := -Wall
export DEB_CXXFLAGS_MAINT_APPEND := -Wall

# used by autogen
ifndef SOURCE_DATE_EPOCH
	export MAN_PAGE_DATE = $(shell env LC_ALL=C date -u -d \
		"`dpkg-parsechangelog --show-field Date`" +%Y-%m-%d)
else
	export MAN_PAGE_DATE = $(shell env LC_ALL=C date -u -d \
		"@$(SOURCE_DATE_EPOCH)" +%Y-%m-%d)
endif

AMCONFBUILDINDEP := $(shell if dh_listpackages | grep -q gnutls-doc ; \
	then echo "--enable-gtk-doc" ; \
	else echo "--disable-gtk-doc --disable-doc"; fi)

override_dh_auto_configure:
	dh_auto_configure --verbose -- \
	--enable-ld-version-script --enable-cxx \
	--enable-static \
	--without-lzo \
	--enable-libdane --without-tpm --disable-guile \
	--disable-heartbeat-support \
	--enable-openssl-compatibility \
	--with-included-unistring \
	--disable-silent-rules \
	--with-unbound-root-key-file=/usr/share/dns/root.key \
	--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt \
	--with-packager=Debian \
	--with-packager-bug-reports=http://bugs.debian.org/ \
	--with-packager-version=$(shell dpkg-parsechangelog | sed -n '/^Version: /s/^Version: //p') \
	$(AMCONFBUILDINDEP)


override_dh_makeshlibs:
	dh_makeshlibs -p libgnutlsxx28 -V 'libgnutlsxx28 (>= 3.3.8-0)'
	dh_makeshlibs -p libgnutls30  -V 'libgnutls30 (>= 3.5.7-0)' -- -c4
	dh_makeshlibs -p libgnutls-dane0  -V 'libgnutls-dane0 (>= 3.5.6-0)' \
		-- -c4
	dh_makeshlibs -p libgnutls-openssl27 -V 'libgnutls-openssl27 (>= 3.0-0)'
	dh_makeshlibs --remaining-packages


# pre-clean rule: save gnutls.pdf since it is expensive to regenerate.
# See README.source
override_dh_auto_clean:
	if [ -e doc/gnutls.pdf ] ; then \
		mv -v doc/gnutls.pdf doc/gnutls.pdf.debbackup ; fi
	if test -e Makefile ; then $(MAKE) distclean ; fi
	#dh_auto_clean --verbose
	# restore gnutls.pdf
	if [ -e doc/gnutls.pdf.debbackup ] && [ ! -e doc/gnutls.pdf ] ; \
		then mv -v doc/gnutls.pdf.debbackup doc/gnutls.pdf ; fi
	rm -fv `grep -El 'has been AutoGen-ed |has been AutoGen-ed *$$' doc/manpages/*.?`

override_dh_auto_build:
	dh_auto_build --verbose --parallel
ifeq ($(filter --disable-doc,$(AMCONFBUILDINDEP)),)
	$(MAKE) html
else
	$(MAKE) -C doc/manpages
endif

override_dh_auto_install:
	dh_auto_install --verbose
ifneq ($(filter --disable-doc,$(AMCONFBUILDINDEP)),)
	$(MAKE) -C doc/manpages DESTDIR=`pwd`/debian/tmp install
endif
	find debian/*/usr/lib/* -name '*.so.*.*' -type f -exec \
		chrpath -d {} +

override_dh_installinfo:
	dh_installinfo
	if test -e debian/gnutls-doc ; then \
		cd debian/gnutls-doc/usr/share/info && \
		sed -i -e 's:image src="\([^"]*.png"\):image src="/usr/share/doc/gnutls-doc/html/\1:g' *.info* ; \
	fi

override_dh_installchangelogs:
	dh_installchangelogs
	rm -vrf debian/libgnutlsxx28/usr/share/doc/libgnutlsxx28
	dh_link -plibgnutlsxx28 usr/share/doc/libgnutls30 \
		usr/share/doc/libgnutlsxx28

override_dh_compress:
	dh_compress -X.pdf

override_dh_strip:
	dh_strip --ddeb-migration='libgnutls30-dbg (<< 3.4.7-2~)'

override_dh_auto_test:
	dh_auto_test -O--parallel --verbose -- VERBOSE=1

override_dh_clean:
	dh_clean -X.bak

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