# Automatically generated by apkbuild-cpan, template 4
# Contributor: rubicon <rubicon@mailo.com>
# Maintainer: rubicon <rubicon@mailo.com>
pkgname=perl-encode-imaputf7
pkgver=1.05
pkgrel=1
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=Encode-IMAPUTF7
pkgdesc="Modification of UTF-7 encoding for IMAP"
url="https://metacpan.org/release/Encode-IMAPUTF7/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-test-nowarnings"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/P/PM/PMAKHOLM/Encode-IMAPUTF7-$pkgver.tar.gz
	perl-5.40-tests.patch
	"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL \
		INSTALLDIRS=vendor \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
e286e059db72c498173a312223152ca492700282345cccbd21ea49e0334fedcd922ae40b018aa8a6b474a10fbff9ac49f46d4c6f9920f3e508adab42bdca976f  Encode-IMAPUTF7-1.05.tar.gz
ac17634ee518e4718e6738837b0021a0fce54942bb3ad330b31946eedc432f593517279f164126ba926a70bef1090be02e04e59ad499fd899277eff3b030779a  perl-5.40-tests.patch
"
