pkgname=gnutls pkgver=3.8.8 pkgrel=1 pkgdesc="A library which provides a secure layer over a reliable transport layer" arch=('x86_64') url="https://www.gnutls.org/" license=('GPL-3.0-or-later AND LGPL-2.1-or-later') depends=( 'glibc' 'gcc-libs' 'gmp' 'libtasn1' 'readline' 'zlib' 'nettle' 'p11-kit' 'libidn2' 'zstd' 'libunistring' 'brotli') options=('!zipman') source=(https://www.gnupg.org/ftp/gcrypt/${pkgname}/v${pkgver%.*}/${pkgname}-${pkgver}.tar.xz config) sha256sums=(ac4f020e583880b51380ed226e59033244bc536cad2623f2e26f5afa2939d8fb 22e614510fe52defe8c233ce3e5ead2205739fd967657ce3176ca121f3c562b5) build() { cd ${pkgname}-${pkgver} local configure_args=( --disable-static --with-idn --with-brotli --with-zstd --enable-ktls --enable-openssl-compatibility --with-default-trust-store-pkcs11="pkcs11:" --docdir=/usr/share/doc/${pkgname}-${pkgver} ${configure_options} ) ./configure ${configure_args[@]} make } package() { cd ${pkgname}-${pkgver} make DESTDIR=${pkgdir} install # prepare to load tls module required for ktls install -dm755 ${pkgdir}/etc/modules-load.d echo "#tls" > ${pkgdir}/etc/modules-load.d/gnutls.conf # disable ktls by default for now install -dm755 ${pkgdir}/etc/gnutls install -Dm644 ${srcdir}/config ${pkgdir}/etc/gnutls/config # lots of .png files are put into infodir and are gzipped by makepkg! this needs to be fixed by using !zipman # gzip -9 all files in infodir and manpages manually find ${pkgdir}/usr/share/info -name '*.info*' -exec gzip -n -9 {} \; find ${pkgdir}/usr/share/man -exec gzip -n -9 {} \; }