# SliTaz package receipt.

PACKED_SIZE="320.0K"
UNPACKED_SIZE="2.6M"
PACKAGE="p11-kit"
VERSION="0.24.1"
CATEGORY="security"
SHORT_DESC="Library to work with PKCS#11 modules."
MAINTAINER="slaxemulator@gmail.com"
LICENSE="BSD"
WEB_SITE="https://p11-glue.freedesktop.org/"
LFS="http://www.linuxfromscratch.org/blfs/view/stable/postlfs/p11-kit.html"

TARBALL="$PACKAGE-$VERSION.tar.xz"
WGET_URL="https://github.com/p11-glue/p11-kit/releases/download/$VERSION/$TARBALL"

BUILD_DEPENDS="cacerts gettext glib glib-dev gtk-doc libffi libffi-dev
	libtasn1-dev libxslt"

# What is the latest version available today?
current_version()
{
	wget -O - ${WGET_URL%/down*} 2>/dev/null | \
	sed '/tag\//!d;s|.*tag/v*||;s|".*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
	./configure					\
		--sysconfdir=/etc			\
		--with-module-path=/usr/lib/pkcs11	\
		$CONFIGURE_ARGS && 
	make &&
	make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	cook_copy_folders	bin
	cook_copy_folders	etc
	cook_copy_files		*.so*
}
