# Automatically generated by apkbuild-cpan, template 3
# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=perl-match-simple
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=match-simple
pkgver=0.012
pkgrel=0
pkgdesc="Simplified clone of smartmatch operator"
url="https://metacpan.org/release/match-simple/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-sub-infix perl-exporter-tiny perl-match-simple-xs"
checkdepends="perl-test-fatal"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/match-simple-$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="
c6abe6ea332f74bbe95f513ab67bf029f0fbcb56141e9884bd48479293ed207e604c80d16fea7c75b9a38a1b9c825eb4bb27a41cbb40ff6a1c099932691f3039  match-simple-0.012.tar.gz
"
