| 1 | # Automatically generated by apkbuild-cpan, template 4 |
| 2 | # Contributor: Antoine Martin (ayakael) <[email protected]> |
| 3 | # Maintainer: Antoine Martin (ayakael) <[email protected]> |
| 4 | pkgname=perl-cgi-formbuilder |
| 5 | pkgver=3.20 |
| 6 | pkgrel=0 |
| 7 | #_pkgreal is used by apkbuild-cpan to find modules at MetaCpan |
| 8 | _pkgreal=CGI-FormBuilder |
| 9 | pkgdesc="Easily generate and process stateful forms" |
| 10 | url="https://metacpan.org/release/CGI-FormBuilder/" |
| 11 | arch="noarch" |
| 12 | license="GPL-1.0-or-later OR Artistic-1.0-Perl" |
| 13 | depends="perl perl-cgi perl-html-template perl-text-template perl-template-toolkit perl-cgi-session" |
| 14 | subpackages="$pkgname-doc" |
| 15 | source="https://cpan.metacpan.org/authors/id/B/BI/BIGPRESH/CGI-FormBuilder-$pkgver.tar.gz" |
| 16 | builddir="$srcdir/$_pkgreal-$pkgver" |
| 17 | |
| 18 | build() { |
| 19 | export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') |
| 20 | PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL \ |
| 21 | INSTALLDIRS=vendor \ |
| 22 | NO_PACKLIST=1 \ |
| 23 | NO_PERLLOCAL=1 |
| 24 | make |
| 25 | } |
| 26 | |
| 27 | check() { |
| 28 | export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') |
| 29 | make test |
| 30 | } |
| 31 | |
| 32 | package() { |
| 33 | make DESTDIR="$pkgdir" install |
| 34 | } |
| 35 | |
| 36 | doc() { |
| 37 | local file; find "$pkgdir" -name "*.pod" | while read -r file; do |
| 38 | amove "${file#"$pkgdir"}" |
| 39 | done |
| 40 | default_doc |
| 41 | } |
| 42 | |
| 43 | sha512sums=" |
| 44 | ecba725d77f36abfdc43074981f884ddcce7d3e72828fdfce08c30450cb6b445f8e04b48257ee576167e6556646256e7a75e873a4c422ae4c19890b17408c9ae CGI-FormBuilder-3.20.tar.gz |
| 45 | " |