# Automatically generated by apkbuild-cpan, template 1
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=perl-module-pluggable
_pkgreal=Module-Pluggable
pkgver=5.2
pkgrel=0
pkgdesc="automatically give your module the ability to have plugins"
url="http://search.cpan.org/dist/Module-Pluggable/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends="   "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/S/SI/SIMONW/$_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 && make test
}

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

md5sums="87ce2971662efd0b69a81bb4dc9ea76c  Module-Pluggable-5.2.tar.gz"
sha256sums="b3f2ad45e4fd10b3fb90d912d78d8b795ab295480db56dc64e86b9fa75c5a6df  Module-Pluggable-5.2.tar.gz"
sha512sums="7df8ee6713c8e0d4df756736c43c2033632cb8887c82ed5b9f38476dbf402b5daa3af83d3b2bd1228afb020ce5855831812f86299b63518e04e0929390b0c5f5  Module-Pluggable-5.2.tar.gz"
