# Automatically generated by apkbuild-cpan, template 3
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-class-dbi
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Class-DBI
pkgver=3.0.17
pkgrel=6
pkgdesc="Simple Database Abstraction"
url="https://metacpan.org/release/Class-DBI/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="
	perl perl-class-accessor perl-class-trigger perl-universal-moniker
	perl-class-data-inheritable perl-ima-dbi perl-clone
	"
checkdepends="perl-dbd-sqlite perl-date-simple perl-dbd-pg"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/T/TM/TMTM/Class-DBI-v$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-v$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="006bc6ca754d24d9cb3791fa99128df597be1f96cb62c309a0f37f169e02e2baec6aa7e6395ddea8202df11488a9db52fa817d8fff7f925097769d70356d1fe7  Class-DBI-v3.0.17.tar.gz"
