community/perl-class-methodmaker: modernize and add check

This commit is contained in:
Roberto Oliveira 2017-11-23 00:19:55 +00:00
parent 7098090313
commit 7dc6a38040

View File

@ -2,7 +2,7 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org> # Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-class-methodmaker pkgname=perl-class-methodmaker
pkgver=2.24 pkgver=2.24
pkgrel=1 pkgrel=2
pkgdesc="Create generic class methods" pkgdesc="Create generic class methods"
url="http://search.cpan.org/dist/Class-MethodMaker" url="http://search.cpan.org/dist/Class-MethodMaker"
arch="all" arch="all"
@ -14,29 +14,23 @@ install=""
subpackages="$pkgname-doc" subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/S/SC/SCHWIGON/class-methodmaker/Class-MethodMaker-$pkgver.tar.gz" source="http://search.cpan.org/CPAN/authors/id/S/SC/SCHWIGON/class-methodmaker/Class-MethodMaker-$pkgver.tar.gz"
_builddir="$srcdir"/Class-MethodMaker-$pkgver builddir="$srcdir/Class-MethodMaker-$pkgver"
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() { build() {
cd "$_builddir" cd "$builddir"
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
make || return 1 make
}
check() {
cd "$builddir"
make test
} }
package() { package() {
cd "$_builddir" cd "$builddir"
make DESTDIR="$pkgdir" install || return 1 make DESTDIR="$pkgdir" install
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
} }
md5sums="6fac1ed1fea8a4e42d36a4d07c8bfa09 Class-MethodMaker-2.24.tar.gz"
sha256sums="5eef58ccb27ebd01bcde5b14bcc553b5347a0699e5c3e921c7780c3526890328 Class-MethodMaker-2.24.tar.gz"
sha512sums="d78f89df41d5c566dee74d30ff1b71488e9510639e795dd2f21e95e0516b039d15dd6743342cb28841e0fc698f64b3b3f349b5da788220598dff6ad95225ae0c Class-MethodMaker-2.24.tar.gz" sha512sums="d78f89df41d5c566dee74d30ff1b71488e9510639e795dd2f21e95e0516b039d15dd6743342cb28841e0fc698f64b3b3f349b5da788220598dff6ad95225ae0c Class-MethodMaker-2.24.tar.gz"