# Automatically generated by apkbuild-cpan, template 4
# Contributor: Timothy Legge <timlegge@gmail.com>
# Maintainer: Timothy Legge <timlegge@gmail.com>
pkgname=perl-spreadsheet-xlsx
pkgver=0.18
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Spreadsheet-XLSX
pkgdesc="Perl extension for reading MS Excel 2007 files"
url="https://metacpan.org/release/Spreadsheet-XLSX/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-spreadsheet-parseexcel perl-archive-zip"
checkdepends="perl-test-nowarnings perl-test-warnings"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/A/AS/ASB/Spreadsheet-XLSX-$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 \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
46dffedce89147407fe55ccb65cf99ac5d5e06eb8d988b7bf3f7a9cf43bec9d96cec1195ef6b7f6ae40c151d31175ded2d959298f3a12f0e4ac1284669515eae  Spreadsheet-XLSX-0.18.tar.gz
"
