# Automatically generated by apkbuild-cpan, template 1
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=perl-xml-libxslt
_pkgreal=XML-LibXSLT
pkgver=1.95
pkgrel=2
pkgdesc="Interface to GNOME libxslt library"
url="http://search.cpan.org/dist/XML-LibXSLT/"
arch="all"
license="GPL PerlArtistic"
cpandepends="perl-xml-libxml"
cpanmakedepends="   "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends libxml2-dev libxslt-dev libgcrypt-dev libgpg-error-dev"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/$_pkgreal-$pkgver.tar.gz"

builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	cd "$builddir"
	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$builddir"
	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	make
}

check() {
        cd "$builddir"
        make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="06a1c9896a391be2588995f25520da05f086b3fa79109884131525a0d76a7b375e0c5a2febf8a79a888f3a9bd25b5eb39064de1baeffafcfe18f5576c9c54e19  XML-LibXSLT-1.95.tar.gz"
