# Automatically generated by apkbuild-cpan, template 4
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=perl-openapi-client
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=OpenAPI-Client
pkgver=1.07
pkgrel=0
pkgdesc="Client for talking to an Open API powered server"
url="https://metacpan.org/release/OpenAPI-Client/"
arch="noarch"
license="Artistic-2.0"
depends="perl perl-json-validator perl-mojolicious-plugin-openapi"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/J/JH/JHTHORSEN/OpenAPI-Client-$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 \
		NO_PACKLIST=1 \
		NO_PERLLOCAL=1
	make
}

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

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

sha512sums="
18167fcbd239436c401d0d4f2775a4cd5032fbcb2feaf5107c2f76a6b822d8c688431265f2d434bfadca2d74592e57ff1fd5721a2194ef906faad538004b7050  OpenAPI-Client-1.07.tar.gz
"