# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=perl-test-object
pkgver=0.08
pkgrel=1
pkgdesc="Thoroughly testing objects via registered handlers"
url="https://metacpan.org/pod/Test::Object"
arch="noarch"
license="GPL-1.0-only OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-Object-$pkgver.tar.gz"
builddir="$srcdir/Test-Object-$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="
c528ee4d8eebb26cc336344765f1c5d402f020dae42f658164a5b2954c48975ccf33dafa768228bddff7583af5cd219959a82d037408c250cf162d59ab3a90d1  Test-Object-0.08.tar.gz
"
