# Contributor: Michael Mason # Maintainer: Natanael Copa pkgname=gnutls pkgver=3.2.12.1 pkgrel=0 pkgdesc="A TLS protocol implementation" url="http://www.gnutls.org/" arch="all" license="GPL" depends= depends_dev="nettle-dev zlib-dev libtasn1-dev p11-kit-dev" makedepends="$depends_dev texinfo" install= subpackages="$pkgname-doc $pkgname-dev $pkgname-utils $pkgname-c++:xx" source="ftp://ftp.gnutls.org/gcrypt/gnutls/v${pkgver%.*.*}/$pkgname-$pkgver.tar.xz libgmp.patch " _builddir="$srcdir/$pkgname-${pkgver%.*}" prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" LIBS="-lgmp" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --disable-openssl-compatibility \ --disable-rpath \ --disable-static \ --disable-guile \ --disable-valgrind-tests \ || return 1 make } package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" install rm -f "$pkgdir"/usr/lib/*.la } utils() { pkgdesc="Command line tools for TLS protocol" mkdir -p "$subpkgdir"/usr/ mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } xx() { pkgdesc="The C++ interface to GnuTLS" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/lib*xx.so.* "$subpkgdir"/usr/lib/ } md5sums="a795db68253d1336f1e3c2ee48c1fee4 gnutls-3.2.12.1.tar.xz 3ce8fb390345afbd490cd9ac487dabbd libgmp.patch" sha256sums="29069907546f6b9e134aafcaa52a030f517835c83de9ffc38b51ab33c31adf12 gnutls-3.2.12.1.tar.xz 39b49c5166819cd4c57ec7d1b42e0470c5d1bde3bebb4b9fbb465d1ef2eb7d2d libgmp.patch" sha512sums="f9fd9fff46a0fb46e46a0d44288c8c4984f1d3688415a71aeb1518007b11d51bd7280d7e6f0d9d0b4d514a702b42d351a0a6a185feb7931f5696eafa87251871 gnutls-3.2.12.1.tar.xz 1c02594d6bf288561ffd1f0828089a8eaa5129eac1fb2631340370ea94099762bcb883aec188bb31bffe22c0ddeee7abad5e3926b1f64dc22c916760ead16a74 libgmp.patch"