# Automatically generated by apkbuild-cpan, template 4
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-business-isbn
pkgver=3.011
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Business-ISBN
pkgdesc="work with International Standard Book Numbers"
url="https://metacpan.org/release/Business-ISBN/"
arch="noarch"
license="Artistic-2.0"
depends="perl perl-business-isbn-data"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY/Business-ISBN-$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 \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

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

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
826a33327be44ec6c4f0d879192c98dc66417d059e1521615e5a70e5a06ab1acf72fd8adef84995d19f54575b70977e0f1ccc7342fe3a6c56cd0aefc130e1b74  Business-ISBN-3.011.tar.gz
"
