aports/testing/perl-json-validator/APKBUILD
2024-01-14 12:49:57 +00:00

52 lines
1.3 KiB
Plaintext

# Automatically generated by apkbuild-cpan, template 4
# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=perl-json-validator
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=JSON-Validator
pkgver=5.14
pkgrel=0
pkgdesc="Validate data against a JSON schema"
url="https://metacpan.org/release/JSON-Validator/"
arch="noarch"
license="Artistic-2.0"
depends="
perl perl-data-validate-domain perl-data-validate-ip
perl-mojolicious perl-net-idn-encode perl-yaml-libyaml
"
checkdepends="perl-test-deep"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/J/JH/JHTHORSEN/JSON-Validator-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
# no perl-sereal-encoder on 32-bit ARM
case "$CARCH" in
armv7|armhf)
;;
*)
depends="$depends perl-sereal-encoder"
;;
esac
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="
411c729c8cb2363a300ba69710545a61565055c1e89f666ee830866131d8c0ad849435f5cbe2fd5e9b083e0efab3e451f51810698acb116a16f5c1c1faea608a JSON-Validator-5.14.tar.gz
"