# Automatically generated by apkbuild-cpan, template 3
# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=perl-sql-statement
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=SQL-Statement
pkgver=1.414
pkgrel=1
pkgdesc="SQL parsing and processing engine"
url="https://metacpan.org/release/SQL-Statement/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-module-runtime perl-params-util perl-clone"
checkdepends="perl-text-soundex perl-test-deep"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RE/REHSACK/SQL-Statement-$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="c8a9e93979d3f775b1e8981fff0cb958791f0a513432133bd376a20eca73da27c40d2dd74b27f3f8f7d326897e3a8b776053080eff40221fd525f546bf474c5b  SQL-Statement-1.414.tar.gz"
