# SliTaz package receipt.

PACKAGE="gnupg"
VERSION="2.0.17"
CATEGORY="security"
SHORT_DESC="Free implementation of the OpenPGP."
MAINTAINER="pankso@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WEB_SITE="http://www.gnupg.org/"
WGET_URL="ftp://ftp.gnupg.org/gcrypt/gnupg/$TARBALL"

DEPENDS="libusb-compat bzlib libcurl libssl readline zlib libgpg-error \
pth libksba libgcrypt libassuan pinentry"
BUILD_DEPENDS="libgpg-error-dev libassuan-dev libgcrypt-dev libksba-dev \
pth-dev libusb-compat-dev linux-module-headers"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	./configure \
		--libexecdir=/usr/lib \
		--disable-ldap \
		$CONFIGURE_ARGS &&
	make && make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/share
	cp -a $_pkg/usr/bin $fs/usr
	cp -a $_pkg/usr/lib $fs/usr
	ln -s gpg2 $fs/usr/bin/gpg
	cp -a $_pkg/usr/share/gnupg $fs/usr/share
	# Chmod for gnup-zip
	chmod 755 $fs/usr/bin/*
}