# Automatically generated by apkbuild-cpan, template 1
# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
pkgname=perl-http-message
_pkgreal=HTTP-Message
pkgver=6.13
pkgrel=0
pkgdesc="HTTP style messages"
url="http://search.cpan.org/dist/HTTP-Message/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-lwp-mediatypes perl-encode-locale perl-http-date perl-uri perl-io-html"
cpanmakedepends=""
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
checkdepends="perl-try-tiny"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/O/OA/OALDERS/$_pkgreal-$pkgver.tar.gz"

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

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="61e911b0bfec2322fa7a31748c17b38e07ecad006ebe249cc063fc68a5f1779765487b5942569575c558a76f8679e8e7f10992b8894cb6905aa66d9185b084d3  HTTP-Message-6.13.tar.gz"
