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,35 +4,42 @@
pkgname=perl-module-refresh pkgname=perl-module-refresh
_pkgreal=Module-Refresh _pkgreal=Module-Refresh
pkgver=0.17 pkgver=0.17
pkgrel=0 pkgrel=1
pkgdesc="Refresh %INC files when updated on disk" pkgdesc="Refresh %INC files when updated on disk"
url="http://search.cpan.org/dist/Module-Refresh/" url="http://search.cpan.org/dist/Module-Refresh/"
arch="noarch" arch="noarch"
license="GPL PerlArtistic" license="GPL PerlArtistic"
cpandepends="" cpandepends=""
cpanmakedepends="perl-path-class " cpanmakedepends="perl-path-class"
depends="$cpandepends" depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends" makedepends="perl-dev $cpanmakedepends perl-module-install"
subpackages="$pkgname-doc" subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/A/AL/ALEXMV/$_pkgreal-$pkgver.tar.gz" source="http://search.cpan.org/CPAN/authors/id/A/AL/ALEXMV/$_pkgreal-$pkgver.tar.gz"
_builddir="$srcdir/$_pkgreal-$pkgver" builddir="$srcdir/$_pkgreal-$pkgver"
prepare() { prepare() {
cd "$_builddir" default_prepare
cd "$builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'` export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
} }
build() { build() {
cd "$_builddir" cd "$builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'` export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
make && make test 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
} }