# Automatically generated by apkbuild-cpan, template 3
# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=perl-orlite
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=ORLite
pkgver=2.00
pkgrel=0
pkgdesc="Extremely light weight SQLite-specific ORM"
url="https://metacpan.org/release/ORLite/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-dbd-sqlite perl-dbi perl-file-remove perl-params-util"
checkdepends="perl-class-xsaccessor perl-test-deep perl-test-script"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/E/ET/ETHER/ORLite-$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="
387abed5ca27b689e0713df2b8a5d119153244f0813590e58481f7e66b1519ebf6e24ce37310ab08376e3544d6b649362765b0100b50ffdf5b8d88659bd0c3fa  ORLite-2.00.tar.gz
"
