# Automatically generated by apkbuild-cpan, template 4
# Contributor: Wen Heping <wenheping2000@hotmail.com>
# Maintainer: Wen Heping <wenheping2000@hotmail.com>
pkgname=perl-plack-middleware-fixmissingbodyinredirect
pkgver=0.12
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Plack-Middleware-FixMissingBodyInRedirect
pkgdesc="Plack::Middleware which sets body for redirect response, if it's not already set"
url="https://metacpan.org/release/Plack-Middleware-FixMissingBodyInRedirect/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-html-parser perl-plack"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/S/SW/SWEETKID/Plack-Middleware-FixMissingBodyInRedirect-$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="
1ea67f6ceb22a5cd17c4bd96f6c2169318394e490257bd13c3715dd95f397df9ccaa2c84993bcd9d799807bdd1682c030724f160cfd17d8fcf9e5096874bcce2  Plack-Middleware-FixMissingBodyInRedirect-0.12.tar.gz
"
