# Automatically generated by apkbuild-cpan, template 3
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-crypt-openssl-dsa
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Crypt-OpenSSL-DSA
pkgver=0.20
pkgrel=6
pkgdesc="Digital Signature Algorithm using OpenSSL"
url="https://metacpan.org/release/Crypt-OpenSSL-DSA/"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
makedepends="perl-dev openssl-dev>3"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/K/KM/KMX/Crypt-OpenSSL-DSA-$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="d9441c63af6eb9c33d040e3734f8b047e27c864c936ddc660323c2794b5cfee76fa37f9f232b3f6c61345bfbc7e5928b2265ecb975189d62af2afa0d07c911e1  Crypt-OpenSSL-DSA-0.20.tar.gz"
