# Template file for 'gpgme'
pkgname=gpgme
version=1.4.2
revision=1
build_style=gnu-configure
configure_args="--enable-fd-passing --with-gpg=/usr/bin/gpg
 --with-gpgsm=/usr/bin/gpgsm --with-gpgconf=/usr/bin/gpgconf
 --with-g13=/usr/bin/g13"
hostmakedepends="gnupg"
makedepends="libgpg-error-devel libassuan-devel"
short_desc="GnuPG Made Easy"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="http://www.gnupg.org/related_software/gpgme/"
distfiles="ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-$version.tar.bz2"
checksum=2c4f2bf71e53e6fb7badf07801d4248777566a621c8c2339c02c289731df6856
long_desc="
 GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier
 for applications. It provides a High-Level Crypto API for encryption,
 decryption, signing, signature verification and key management. Currently it
 uses GnuPG as its backend but the API isn't restricted to this engine; in fact
 we have already developed a backend for CMS (S/MIME).

 Because the direct use of GnuPG from an application can be a complicated
 programming task, it is suggested that all software should try to use GPGME
 instead. This way bug fixes or improvements can be done at a central place
 and every application benefits from this."

if [ "$CROSS_BUILD" ]; then
	configure_args+=" --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
			  --with-libassuan-prefix=$XBPS_CROSS_BASE/usr"
fi

gpgme-devel_package() {
	depends="libgpg-error-devel libassuan-devel gpgme>=${version}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/bin
		vmove usr/include
		vmove usr/share
		vmove "usr/lib/*.so"
	}
}

gpgme_package() {
	depends="libassuan>=2.0.3 gnupg"
	pkg_install() {
		vmove all
	}
}
