# Automatically generated by apkbuild-cpan, template 3
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-crypt-openssl-rsa
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Crypt-OpenSSL-RSA
pkgver=0.33
pkgrel=4
pkgdesc="RSA encoding and decoding, using the openSSL libraries"
url="https://metacpan.org/release/Crypt-OpenSSL-RSA/"
arch="all"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-crypt-openssl-random"
makedepends="perl-dev openssl-dev>3 perl-crypt-openssl-guess"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/T/TO/TODDR/Crypt-OpenSSL-RSA-$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="
7bfa802ec41925ec9fa6937c5eea0d21f6f554a1d1d57ed679ed03b260cf08c0a397df11880de6d67abacfd843ad2c4f28b20ac58d80e183c2a83c91deb926bf  Crypt-OpenSSL-RSA-0.33.tar.gz
"
