# Automatically generated by apkbuild-cpan, template 1
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-http-server-simple
_pkgreal=HTTP-Server-Simple
pkgver=0.52
pkgrel=0
pkgdesc="Lightweight HTTP server"
url="http://search.cpan.org/dist/HTTP-Server-Simple/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-cgi"
cpanmakedepends=""
checkdepends="perl-test-pod perl-test-pod-coverage"
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/B/BP/BPS/$_pkgreal-$pkgver.tar.gz"

builddir="$srcdir/$_pkgreal-$pkgver"

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

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
}

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

sha512sums="57c0aa4ceb7e0f430f577e24c275d96d54ceb15ddf6e53710067f57dac50e8a57661399d0093edf28c1ff7b6ed313471cded48f5792349191b8d60d8d7cde2d1  HTTP-Server-Simple-0.52.tar.gz"
