# Automatically generated by apkbuild-cpan, template 3
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-dancer
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Dancer
pkgver=1.3521
pkgrel=1
pkgdesc="lightweight yet powerful web application framework"
url="https://metacpan.org/release/Dancer/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-module-runtime perl-try-tiny perl-hash-merge-simple perl-mime-types
	perl-http-server-simple-psgi perl-http-body perl-http-message perl-http-date perl-uri
	"
makedepends="perl-dev"
checkdepends="
	perl-json perl-http-cookiejar perl-plack perl-data-dump perl-test-nowarnings
	perl-http-message perl-test-longstring perl-yaml"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/Y/YA/YANICK/Dancer-$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="
e6f8ddfd3ee5049821843ceda418bcc89cb976bb75ec21eff0879c612106484c035db536340efee2e00adde4f31d5de556d16ae5423924d4ca49129baac68707  Dancer-1.3521.tar.gz
"
