# Automatically generated by apkbuild-cpan, template 3
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=perl-text-markdown
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Text-Markdown
pkgver=1.000031
pkgrel=0
pkgdesc="Convert Markdown syntax to (X)HTML"
url="https://metacpan.org/release/Text-Markdown/"
arch="noarch"
license="BSD-3-Clause"
depends="perl"
makedepends="perl-dev perl-list-moreutils perl-test-exception perl-test-differences"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/B/BO/BOBTFISH/Text-Markdown-$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="
58bef4eba58572c4990849209005109a969bf404a7bc5dfbaae25aa1d0b89317ea9b412658180dcfd96b2c809d5c6900e2118838535dfa9cad6d9b45969bee05  Text-Markdown-1.000031.tar.gz
"
