# SliTaz package receipt.

PACKAGE="gnutls"
VERSION="2.12.14"
CATEGORY="security"
SHORT_DESC="GNU Transport Layer Security Library"
MAINTAINER="erjo@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WEB_SITE="http://www.gnu.org/software/gnutls/"
WGET_URL="http://ftp.gnu.org/gnu/$PACKAGE/$TARBALL"

DEPENDS="nettle libgpg-error ncurses readline zlib gcc-lib-base libgnutls \
libtasn1 p11-kit"
BUILD_DEPENDS="libtasn1-dev ncurses-dev readline-dev p11-kit-dev \
nettle-dev libgpg-error-dev libgcrypt-dev"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	# Apply http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0092 fix
	# from https://www.gitorious.org/gnutls/gnutls/commit/6aa26f78150ccbdf0aec1878a41c17c41d358a3b
	patch -p1 < $stuff/CVE-2014-0092.u
	./configure --with-libgcrypt \
	--disable-guile \
	--with-zlib \
	$CONFIGURE_ARGS &&
	make && make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr
	cp -a $_pkg/usr/bin $fs/usr
}