# Automatically generated by apkbuild-cpan, template 3
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-text-bibtex
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Text-BibTeX
pkgver=0.89
pkgrel=3
pkgdesc="interface to read and parse BibTeX files"
url="https://metacpan.org/release/Text-BibTeX/"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev perl-module-build perl-config-autoconf perl-extutils-libbuilder perl-capture-tiny"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/A/AM/AMBS/Text-BibTeX-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	perl Build.PL --installdirs=vendor
	./Build
}

check() {
	./Build test
}

package() {
	./Build install --destdir="$pkgdir"
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="
68f730fbacf541e693181d7b1f74bf7531222f3933a95651940d2ee5d48806188f2ab64329edf90eb3393d7fc3ddd58476b9908fde60e758c949c0ede6154d5b  Text-BibTeX-0.89.tar.gz
"
