# Automatically generated by apkbuild-cpan, template 3
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-business-hours
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Business-Hours
pkgver=0.13
pkgrel=4
pkgdesc="Perl module for Business-Hours"
url="https://metacpan.org/release/Business-Hours/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-set-intspan"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/B/BP/BPS/Business-Hours-$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="
2fb0c5c017f4dd5eaeaf394b7534348473bf47009020d23d5fb642ae67a06d8041f6dae4d554e8e36412cecf447a300f30bcacf4f8aab3c357ea81b6a5c55d7c  Business-Hours-0.13.tar.gz
"
