# Automatically generated by apkbuild-cpan, template 3
# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=perl-dbd-csv
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=DBD-CSV
pkgver=0.60
pkgrel=1
pkgdesc="DBI driver for CSV files"
url="https://metacpan.org/release/DBD-CSV/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-dbi perl-text-csv_xs perl-sql-statement"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/DBD-CSV-$pkgver.tgz"
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="
d5ccf984022001e6a51301107a807a312885dabae243f0d2418265a1672b4c96b173ebf0cf2b30a194fe115ea026c3e23c97b11c607c8efe3902257d99a00089  DBD-CSV-0.60.tgz
"
