# Automatically generated by apkbuild-cpan, template 1
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-module-refresh
_pkgreal=Module-Refresh
pkgver=0.17
pkgrel=1
pkgdesc="Refresh %INC files when updated on disk"
url="http://search.cpan.org/dist/Module-Refresh/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends="perl-path-class"
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends perl-module-install"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/A/AL/ALEXMV/$_pkgreal-$pkgver.tar.gz"

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

prepare() {
	default_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
}

md5sums="b077d06cab125aaff940d859945727f4  Module-Refresh-0.17.tar.gz"
sha256sums="6b30a6ceddc6512ab4490c16372ecf309a259f2ca147d622e478ac54e08511c3  Module-Refresh-0.17.tar.gz"
sha512sums="48bbcf14d5c6f13217b41c9a4683fd5ff492d3d33f8d6d50e89eae8a6336f306358e0070ecf1617d68c6eb9f91caaec6e1048e09b741d3fa0a19f6d38a75f17f  Module-Refresh-0.17.tar.gz"
