### this file is sourced not run
PKGVER=3.6.12
PKGBUILD=1
PKGARCH=x86_64

# BLFS 7.5 updated to BLFS 8.2 updated to latest
TARBALL=gnutls-$PKGVER.tar.xz
MD5SUM=a23900f14980a467bdce3a0fd31dfa18
#SRC_URL=ftp://ftp.gnutls.org/gcrypt/gnutls/v3.6/$TARBALL
SRC_URL=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/$TARBALL
BUNDLE=

SLACKREQ='libtasn1 libnettle libgmp libp11kit libidn2 libunistring'
SLACKDESC="libgnutls: libgnutls $PKGVER (TLS library)  
libgnutls:  
libgnutls: The GnuTLS package contains libraries and userspace tools which 
libgnutls: provide a secure layer over a reliable transport layer. GnuTLS 
libgnutls: provides support for TLS 1.1, TLS 1.0 and SSL 3.0 protocols, TLS 
libgnutls: extensions, including server name and max record size. 
libgnutls: Additionally, the library supports authentication using the SRP 
libgnutls: protocol, X.509 certificates and OpenPGP keys, along with support 
libgnutls: for the TLS Pre-Shared-Keys (PSK) extension, the Inner Application 
libgnutls: (TLS/IA) extension and X.509 and OpenPGP certificate handling.  
libgnutls:
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/gnutls* &&
	#patch -Np1 -i ../pkg/ignore-premature-termination.patch &&
	true
}
### default pkg_package
### build
pkg_build() {
	export USE_ARCH=64
	CONFFLAGS="$CONFFLAGS --disable-static \
		--docdir=/usr/share/doc/gnutls-$PKGVER \
		--with-default-trust-store-file=/etc/ssl/ca-bundle.crt \
		--with-default-trust-store-dir=/etc/ssl/certs \
	    --with-default-trust-store-pkcs11=pkcs11: "
		#--without-p11-kit --with-included-unistring
	pkg_build_autoconf &&
	
	make -C doc/reference install-data-local &&
	pkg_build_slackdesc
}
