# Automatically generated by apkbuild-cpan, template 3
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=perl-sereal-decoder
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Sereal-Decoder
pkgver=5.004
pkgrel=2
pkgdesc="Fast, compact, powerful binary deserialization"
url="https://metacpan.org/release/Sereal-Decoder/"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev zstd-dev"
checkdepends="perl-test-longstring perl-test-warn perl-test-deep perl-test-differences"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/Y/YV/YVES/Sereal-Decoder-$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="
8125abc3bf1834b6c3c2e7404810150408f71d98658078b622b9234d25ff907208d2532055928752c7956434139cd837b38e05a8867bebdbd722cd5be197fa49  Sereal-Decoder-5.004.tar.gz
"
