From f12b941ccc3d3057b625254fe298a6e08433d5ea Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Mon, 6 Aug 2012 21:28:08 -0500
Subject: gnutls 3.0.21

---
 abs/core/gnutls/PKGBUILD       | 42 +++++++++++++++++++++++++++++++-----------
 abs/core/gnutls/gnutls.install | 10 ++++++----
 2 files changed, 37 insertions(+), 15 deletions(-)

diff --git a/abs/core/gnutls/PKGBUILD b/abs/core/gnutls/PKGBUILD
index ea0c443..e6d5075 100644
--- a/abs/core/gnutls/PKGBUILD
+++ b/abs/core/gnutls/PKGBUILD
@@ -1,22 +1,42 @@
-# $Id: PKGBUILD 72984 2010-03-21 17:04:24Z jgc $
+# $Id: PKGBUILD 162907 2012-07-03 15:25:08Z andyrtr $
 # Maintainer: Jan de Groot <jgc@archlinux.org>
 
 pkgname=gnutls
-pkgver=2.8.6
-pkgrel=4
+pkgver=3.0.21
+pkgrel=1
 pkgdesc="A library which provides a secure layer over a reliable transport layer"
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
 license=('GPL3' 'LGPL')
 url="http://www.gnu.org/software/gnutls/"
 install=gnutls.install
-options=('libtool')
-depends=('gcc-libs>=4.4.3' 'libtasn1>=2.6' 'readline>=6.0' 'zlib' 'libgcrypt>=1.4.5' 'texinfo')
-source=(ftp://ftp.gnu.org/gnu/gnutls/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('eb0a6d7d3cb9ac684d971c14f9f6d3ba')
+options=('!libtool' '!zipman')
+depends=('gcc-libs' 'libtasn1' 'readline' 'zlib' 'nettle>=2.4' 'p11-kit>=0.12')
+makedepends=('valgrind' 'strace')
+source=(ftp://ftp.gnu.org/gnu/gnutls/${pkgname}-${pkgver}.tar.xz{,.sig})
+md5sums=('7480dff7115e5af85215893c06b3ac5c'
+         'c84eb5e67f1498c60ea6fd6ba9045def')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
-  ./configure --prefix=/usr --with-zlib --disable-guile || return 1
-  make || return 1
-  make DESTDIR="${pkgdir}" install || return 1
+  ./configure --prefix=/usr \
+	--with-zlib \
+	--disable-static \
+	--disable-guile \
+	--disable-valgrind-tests
+  make
+}
+
+check() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make -k check # passes all  || /bin/true
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+  
+  # lots of .png files are put into infodir and are gzipped by makepkg! this may need to be fixed by using !zipman
+  # gzip -9 all files in infodir and manpages manually
+  find "$pkgdir/usr/share/info" -name '*.info*' -exec gzip -9 {} \;
+  find "$pkgdir/usr/share/man" -exec gzip -9 {} \;
 }
diff --git a/abs/core/gnutls/gnutls.install b/abs/core/gnutls/gnutls.install
index b9a5bae..e8c8e17 100644
--- a/abs/core/gnutls/gnutls.install
+++ b/abs/core/gnutls/gnutls.install
@@ -1,9 +1,10 @@
-infodir=/usr/share/info
-filelist=(gnutls.info gnutls.info-1 gnutls.info-2 gnutls.info-3)
+infodir=usr/share/info
+filelist=(gnutls.info-1.gz gnutls.info-2.gz gnutls.info-3.gz gnutls.info-4.gz gnutls.info.gz)
 
 post_install() {
+  [ -x usr/bin/install-info ] || return 0
   for file in ${filelist[@]}; do
-    install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+    install-info $infodir/$file $infodir/dir 2> /dev/null
   done
 }
 
@@ -12,7 +13,8 @@ post_upgrade() {
 }
 
 pre_remove() {
+  [ -x usr/bin/install-info ] || return 0
   for file in ${filelist[@]}; do
-    install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+    install-info --delete $infodir/$file $infodir/dir 2> /dev/null
   done
 }
-- 
cgit v0.12

