# Automatically generated by apkbuild-cpan, template 1
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-regexp-common
_pkgreal=Regexp-Common
pkgver=2016010801
pkgrel=0
pkgdesc="Provide commonly requested regular expressions"
url="http://search.cpan.org/dist/Regexp-Common/"
arch="noarch"
license="mit"
cpandepends=""
cpanmakedepends="   "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/A/AB/ABIGAIL/$_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="a7a86d2d4ec05b77898823f7b36ff59e  Regexp-Common-2016010801.tar.gz"
sha256sums="65558ad12b5f6250c483b5980e8533048c46912d6d69c76150f8f95a5b8eb1c4  Regexp-Common-2016010801.tar.gz"
sha512sums="c45f43ba87b320ebf1aae3bf46e8ba7233bed26d7da13e7daf76eb11af95bd05b61811a0de76679702dc24e1e464589273e36d3dbbc0abf8d1ec0f984983643f  Regexp-Common-2016010801.tar.gz"