# Automatically generated by apkbuild-cpan, template 4
# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=perl-dbd-csv
pkgver=0.62
pkgrel=0
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=DBD-CSV
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 \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

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

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

sha512sums="
088b182c502725ea63ed5d7d618560bbdb58ce4dd37e5b536c9ba88b4b5c5ee79f20026512950a009b6d82f0db83a870588af2ab63d46bf9cfa88094133b4239  DBD-CSV-0.62.tgz
"
