main/perl-module-refresh: add missing make dependency and modernize

This commit is contained in:
Roberto Oliveira 2017-11-11 12:11:12 +00:00 committed by Carlo Landmeter
parent ac33ca9b18
commit 535882eaed

View File

@ -4,7 +4,7 @@
pkgname=perl-module-refresh
_pkgreal=Module-Refresh
pkgver=0.17
pkgrel=0
pkgrel=1
pkgdesc="Refresh %INC files when updated on disk"
url="http://search.cpan.org/dist/Module-Refresh/"
arch="noarch"
@ -12,27 +12,34 @@ license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends="perl-path-class"
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
makedepends="perl-dev $cpanmakedepends perl-module-install"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/A/AL/ALEXMV/$_pkgreal-$pkgver.tar.gz"
_builddir="$srcdir/$_pkgreal-$pkgver"
builddir="$srcdir/$_pkgreal-$pkgver"
prepare() {
cd "$_builddir"
default_prepare
cd "$builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}
build() {
cd "$_builddir"
cd "$builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
make && make test
make
}
check() {
cd "$builddir"
make test
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
cd "$builddir"
make DESTDIR="$pkgdir" install
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}