Name libgnutls30t64
Description GNU TLS library - main runtime library
Version 3.8.9-3+deb13u1
Package Base gnutls28
Homepage https://www.gnutls.org/
Maintainers ['Debian GnuTLS Maintainers <pkg-gnutls-maint@lists.alioth.debian.org>']
Contributors ['Andreas Metzler <ametzler@debian.org>', 'Eric Dorland <eric@debian.org>', 'James Westby <jw+debian@jameswestby.net>', 'Simon Josefsson <simon@josefsson.org>,']
Distro-repo https://salsa.debian.org/gnutls-team/gnutls
Sources ['https://sources.debian.org/data/main/g/gnutls28/3.8.9-3+deb13u1/debian/watch', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/14_version_gettextcat.diff', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/40_srptest_doubletimeout.diff', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/41_run_cligen_on_debian.diff', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/45_lib-x509-x509_ext.c-Add-gnutls_free-to-avoid-memory-.patch', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/46_lib-hello_ext.c-Add-gnutls_free-to-avoid-memory-leak.patch', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/47_0001-x509-fix-read-buffer-overrun-in-SCT-timestamps.patch', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/47_0002-psk-fix-read-buffer-overrun-in-the-pre_shared_key-ex.patch', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/47_0003-x509-reject-zero-length-version-in-certificate-reque.patch', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/47_0004-x509-avoid-double-free-when-exporting-othernames-in-.patch', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/47_0005-certtool-avoid-1-byte-write-buffer-overrun-when-pars.patch', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/47_0006-handshake-clear-HSK_PSK_SELECTED-is-when-resetting-b.patch', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/48_0001-pkcs11-try-to-initialize-modules-in-thread-safe-mode.patch', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/48_0002-pkcs11-avoid-stack-overwrite-when-initializing-a-tok.patch', 'https://sources.debian.org/src/gnutls28/3.8.9-3+deb13u1/debian/patches/series']
Dependencies ['libc6', 'libgmp10', 'libhogweed6t64', 'libidn2-0', 'libnettle8t64', 'libp11-kit0', 'libtasn1-6', 'libunistring5']
Optional-Dependencies ['gnutls-bin']
Build-Dependencies ['dpkg-dev', 'bison', 'ca-certificates <!nocheck>', 'chrpath', 'debhelper-compat', 'freebsd-net-tools [kfreebsd-i386 kfreebsd-amd64] <!nocheck>', 'gperf', 'libcmocka-dev <!nocheck>', 'libidn2-dev', 'libp11-kit-dev', 'libssl-dev <!nocheck>', 'libtasn1-6-dev', 'libunbound-dev', 'libunistring-dev', 'net-tools [!kfreebsd-i386 !kfreebsd-amd64] <!nocheck>', 'nettle-dev', 'openssl <!nocheck>', 'pkgconf', 'python3', 'softhsm2 <!nocheck>']
Provides []
Builddate
Architecture amd64
Distro-Version trixie
Licenses []
Hash 5ab5d752f5e72104f29e60a5cc28b134be35d20a592196df472618196905dfae
#! /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

AMCONFBUILDINDEP := $(shell if dh_listpackages | grep -q gnutls-doc ; \
	then echo "--enable-gtk-doc" ; \
	else echo "--disable-gtk-doc --disable-doc"; 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 \
		$(AMCONFBUILDINDEP)

override_dh_autoreconf:
	grep -rl --null gettext-0.20 m4/ | xargs -0r rm -v
	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 libgnutls30t64  \
		-V 'libgnutls30t64 (>= 3.7.0-0)' -- -c4
	dh_makeshlibs $(BDIR) -p libgnutls-dane0t64  \
		-V 'libgnutls-dane0t64 (>= 3.7.0-0)' \
		-- -c4
	dh_makeshlibs $(BDIR) -p libgnutls-openssl27t64 \
		-V 'libgnutls-openssl27t64 (>= 3.7.0-0)' \
		-- -c4
	dh_makeshlibs $(BDIR) --remaining-packages

execute_after_dh_auto_clean:
	find cligen -name '*.pyc' -delete

override_dh_auto_build:
	# temporarily avoid regeneration of manpages
	# 50-0002-Move-the-GNUTLS_NO_EXTENSIONS-compatibility-define-t.patch
	# does not change the generated docs.
	touch --reference=lib/includes/gnutls/abstract.h \
		lib/includes/gnutls/gnutls.h.in
	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 {} +
	find debian/*/usr/lib/ -name 'libgnutlsxx.*' -delete

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_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

%:
	dh $@ --builddirectory=b4deb