blob: d9ed51f2b6e6275bfb85190e3e74f072626ccdc2 (
plain)
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
|
#! /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
include /usr/share/dpkg/pkg-info.mk
# 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)
AMCONFBUILDGUILE := $(shell if dh_listpackages | grep -q guile-gnutls ; \
then echo " --enable-guile" ; \
else echo " --disable-guile" ; fi)
CONFIGUREARGS = \
--enable-ld-version-script --enable-cxx \
--disable-rpath \
--enable-libdane --without-tpm \
--enable-openssl-compatibility \
--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=$(DEB_VERSION) \
BDIR = -O--builddirectory=b4deb
override_dh_auto_configure:
dh_auto_configure --verbose $(BDIR) -- \
$(CONFIGUREARGS) \
--enable-static \
$(AMCONFBUILDGUILE) \
$(AMCONFBUILDINDEP)
override_dh_autoreconf:
rm -v `grep -rl gettext-0.20 m4/`
if ! dh_listpackages | grep -q gnutls-doc ; \
then env GTKDOCIZE="echo DISABLED running gtkdocize" \
dh_autoreconf --verbose $(BDIR) ; \
else \
dh_autoreconf --verbose $(BDIR) ; \
fi
override_dh_makeshlibs:
dh_makeshlibs $(BDIR) -p libgnutlsxx30 -V 'libgnutlsxx30 (>= 3.7.4)'
dh_makeshlibs $(BDIR) -p libgnutls30 \
-V 'libgnutls30 (>= 3.7.0-0)' -- -c4
dh_makeshlibs $(BDIR) -p libgnutls-dane0 \
-V 'libgnutls-dane0 (>= 3.7.0-0)' \
-- -c4
dh_makeshlibs $(BDIR) -p libgnutls-openssl27 \
-V 'libgnutls-openssl27 (>= 3.7.0-0)' \
-- -c4
dh_makeshlibs $(BDIR) --remaining-packages \
-Xguile/2.2/ -Xguile/3.0/
# 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 $(BDIR) --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
override_dh_auto_build:
dh_auto_build $(BDIR) --verbose
ifeq ($(filter --disable-doc,$(AMCONFBUILDINDEP)),)
$(MAKE) -C b4deb html
rm -f doc/gnutls.pdf && $(MAKE) -C b4deb/doc gnutls.pdf
else
$(MAKE) -C b4deb/doc/manpages
endif
override_dh_auto_install:
dh_auto_install $(BDIR) --verbose
ifneq ($(filter --disable-doc,$(AMCONFBUILDINDEP)),)
$(MAKE) -C b4deb/doc/manpages DESTDIR=$(CURDIR)/debian/tmp install
else
$(MAKE) -C b4deb/doc/ DESTDIR=$(CURDIR)/debian/tmp install-html
# we symlink these
rm -vf debian/tmp/usr/share/info/*.png
endif
find debian/*/usr/lib/* -name '*.so.*.*' -type f -exec \
chrpath -d {} +
override_dh_installinfo:
dh_installinfo $(BDIR)
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 $(BDIR)
rm -vrf debian/libgnutlsxx30/usr/share/doc/libgnutlsxx30
dh_link $(BDIR) -plibgnutlsxx30 usr/share/doc/libgnutls30 \
usr/share/doc/libgnutlsxx30
override_dh_compress:
dh_compress $(BDIR) -X.pdf
override_dh_auto_test:
dh_auto_test $(BDIR) --verbose -- VERBOSE=1
override_dh_clean:
dh_clean $(BDIR) -X.bak
# Fails with "dwz: Section overlap detected"
override_dh_dwz:
dh_dwz $(BDIR) -Xextra.go -Xgnutls.go
%:
dh $@ --builddirectory=b4deb
|