# SliTaz package receipt.

PACKAGE="gpa"
VERSION="0.10.0"
CATEGORY="security"
SHORT_DESC="Gnu Privacy Assistant."
MAINTAINER="erjo@slitaz.org"
LICENSE="GPL3"
WEB_SITE="https://www.gnupg.org/related_software/gpa/"

TARBALL="$PACKAGE-$VERSION.tar.bz2"
WGET_URL="https://www.gnupg.org/ftp/gcrypt/gpa/$TARBALL"

DEPENDS="gpgme gtk+ pinentry-gtk"
BUILD_DEPENDS="gpgme-dev gtk+-dev libassuan-dev libgpg-error-dev"
SPLIT="gpa-langpack"

# What is the latest version available today?
current_version()
{
	wget -O - ${WGET_URL%/*} 2>/dev/null | \
	sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
	# Integrity check: https://www.gnupg.org/download/integrity_check.html
	echo "61475989acd12de8b7daacd906200e8b4f519c5a  $SRC/$TARBALL" | sha1sum -c || exit 1

	./configure $CONFIGURE_ARGS &&
	make &&
	make install

	find $install/usr/share/man -type f -exec gzip -9 \{\} \;
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	cp -a $install/*	$fs
	rm -r			$fs/usr/share/locale
}