# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-sub-exporter
_pkgreal=Sub-Exporter
pkgver=0.987
pkgrel=1
pkgdesc="a sophisticated exporter for custom-built routines"
url="http://search.cpan.org/dist/Sub-Exporter/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-data-optlist perl-sub-install perl-params-util perl-test-pod"
cpanmakedepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/$_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="6b682d27a0df8ce971ea48aeca5162e1c70929c51cf27119b30361477876b0b86ecb15ab13a6c3cbe5bb85be9e600589fb9e3c9c4e94bad3fc05b675d293adad  Sub-Exporter-0.987.tar.gz"
