# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-string-rewriteprefix
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=String-RewritePrefix
pkgver=0.009
pkgrel=1
pkgdesc="rewrite strings based on a set of known prefixes"
url="https://metacpan.org/release/String-RewritePrefix/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-sub-exporter"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RJ/RJBS/String-RewritePrefix-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

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

sha512sums="
e2498aebb2c9fbb8fe32a8e8aceb29e0e1d514092385b14d72cc5c2c9921dacff4dc7c4ec1e3d0b27e89ebca4cd0226b416c3aa99ca57174d845cec7fceceb8d  String-RewritePrefix-0.009.tar.gz
"
