# Automatically generated by apkbuild-cpan, template 1
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-business-hours
_pkgname=Business-Hours
pkgver=0.13
pkgrel=1
pkgdesc="Calculate business hours in a time period"
url="https://metacpan.org/release/Business-Hours/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-set-intspan"
cpanmakedepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/B/BP/BPS/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
	default_prepare

	cd "$builddir"
	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$builddir"
	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	make
}

check() {
        cd "$builddir"
        make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="2fb0c5c017f4dd5eaeaf394b7534348473bf47009020d23d5fb642ae67a06d8041f6dae4d554e8e36412cecf447a300f30bcacf4f8aab3c357ea81b6a5c55d7c  Business-Hours-0.13.tar.gz"
