# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=perl-test-subcalls
pkgver=1.10
pkgrel=1
pkgdesc="Track the number of times subs are called"
url="https://metacpan.org/pod/Test::SubCalls"
arch="noarch"
license="GPL-1.0-only OR Artistic-1.0-Perl"
depends="perl perl-hook-lexwrap"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-SubCalls-$pkgver.tar.gz"
builddir="$srcdir/Test-SubCalls-$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="
67c64eeb9dbf7ed2f5fd4461316ee44cba4f503c6b822a5fb8c3f100c3d4de7ac09058afc0cdf355549829d8e412d1919bc64a1f3030f16f38775b029936a4f9  Test-SubCalls-1.10.tar.gz
"
