summarylogtreecommitdiffstats
path: root/PKGBUILD.tt
diff options
context:
space:
mode:
authorAnton Leontiev2019-08-20 11:28:41 +0300
committerAnton Leontiev2019-08-20 11:28:47 +0300
commit23f812c89ac3147ec9e0289072106fa03ade9464 (patch)
tree4872cad94f3170484b15b59a4cc284b14ea9679a /PKGBUILD.tt
parent6d141405029158cdcf6a3c215bb0216430f9a9f5 (diff)
downloadaur-perl-b-hooks-op-annotation.tar.gz
Sanitize environment and fix command to remove .packlist and perllocal.pod
Diffstat (limited to 'PKGBUILD.tt')
-rw-r--r--PKGBUILD.tt36
1 files changed, 22 insertions, 14 deletions
diff --git a/PKGBUILD.tt b/PKGBUILD.tt
index 5bf321f45f9b..deb712402766 100644
--- a/PKGBUILD.tt
+++ b/PKGBUILD.tt
@@ -5,28 +5,36 @@
pkgname=[% pkgname %]
pkgver=[% pkgver %]
pkgrel=[% pkgrel %]
-pkgdesc="Perl module that allows XS modules to annotate and delegate hooked OPs"
-arch=("i686" "x86_64")
-url="[% url %]"
-license=("PerlArtistic" "GPL")
-depends=("perl" "perl-extutils-depends>=0.304")
+pkgdesc='Perl module that allows XS modules to annotate and delegate hooked OPs'
+arch=('i686' 'x86_64')
+url='[% url %]'
+license=('PerlArtistic' 'GPL')
+depends=('perl' 'perl-extutils-depends>=0.304')
source=([% source %])
options=(!emptydirs)
-md5sums=("[% md5sums %]")
+md5sums=('[% md5sums %]')
+
+sanitize() {
+ unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
+ export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL="--skipdeps"
+}
build() {
- cd "$srcdir/[% distdir %]"
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
+ cd [% distdir %]
+ sanitize
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
}
check() {
- cd "$srcdir/[% distdir %]"
- make test
+ cd [% distdir %]
+ sanitize
+ make test
}
package() {
- cd "$srcdir/[% distdir %]"
- make install DESTDIR="$pkgdir"
- find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
+ cd [% distdir %]
+ sanitize
+ make install DESTDIR="$pkgdir"
+ find "$pkgdir" \( -name .packlist -o -name perllocal.pod \) -delete
}