# Automatically generated by apkbuild-cpan, template 1
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-json-maybexs
_pkgreal=JSON-MaybeXS
pkgver=1.003008
pkgrel=0
pkgdesc="Use L<Cpanel::JSON::XS> with a fallback to L<JSON::XS> and L<JSON::PP>"
url="http://search.cpan.org/dist/JSON-MaybeXS/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-cpanel-json-xs"
cpanmakedepends="  perl-test-without-module "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/$_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 && make test
}

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

md5sums="5fc1cd29d699dbad7f41e05ccd14118d  JSON-MaybeXS-1.003008.tar.gz"
sha256sums="0964385e021397283de5a9581c524a3a847bb069d63f3ea4ba6f9c4d214c6c82  JSON-MaybeXS-1.003008.tar.gz"
sha512sums="dd556082ea97cf2b7f492f4e0782b80b9d2810b3b5c13ca06958b8b0eaddd1ba34ea8047cbb332e56716ff4346a2044369386c331efe61830fa4e14075173eb9  JSON-MaybeXS-1.003008.tar.gz"
