# SliTaz package receipt.

PACKED_SIZE="228.0K"
UNPACKED_SIZE="608.0K"
PACKAGE="libgcrypt"
VERSION="1.5.3"
CATEGORY="security"
SHORT_DESC="Cryptographic library based on GnuPG"
MAINTAINER="erjo@slitaz.org"
LICENSE="GPL2 LGPL2.1"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WEB_SITE="http://www.gnupg.org/"
WGET_URL="ftp://ftp.gnupg.org/gcrypt/libgcrypt/$TARBALL"
HOST_ARCH="i486 arm"

DEPENDS="libgpg-error"
BUILD_DEPENDS="libgpg-error-dev"

# Rules to configure and make the package.
compile_rules()
{
	case "$ARCH" in
		arm)
			#LIBS="-L/cross/arm/sysroot/usr/lib -lgpg-error"
			./configure \
				--build=i486-slitaz-linux \
				--host=arm-slitaz-linux-gnueabi ;;
		*)
			export LDFLAGS="-Wl,--copy-dt-needed-entries -lgpg-error"
			./configure \
				--build=$HOST_SYSTEM \
				--host=$HOST_SYSTEM ;;
	esac &&
	make && make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/bin $fs/usr/lib
	cp -a $install/usr/bin/dumpsexp $fs/usr/bin
	cp -a $install/usr/bin/hmac256 $fs/usr/bin
	cp -a $install/usr/lib/*.so* $fs/usr/lib
}
