summarylogtreecommitdiffstats
path: root/PKGBUILD.tt
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD.tt')
-rw-r--r--PKGBUILD.tt19
1 files changed, 14 insertions, 5 deletions
diff --git a/PKGBUILD.tt b/PKGBUILD.tt
index 60bfcaef727..da8c38a2602 100644
--- a/PKGBUILD.tt
+++ b/PKGBUILD.tt
@@ -9,24 +9,33 @@ pkgdesc="Perl parser for Tom's Obvious, Minimal Language"
arch=('any')
url='[% url %]'
license=('GPL2')
-depends=('perl')
+makedepends=('perl-module-build-tiny>=0.35')
+depends=('perl-toml-parser>=0.04')
source=([% source %])
options=(!emptydirs)
md5sums=('[% md5sums %]')
+sanitize() {
+ unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
+ export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL="--skipdeps" MODULEBUILDRC=/dev/null
+}
+
build() {
cd [% distdir %]
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
+ sanitize
+ /usr/bin/perl Build.PL --installdirs vendor --destdir "$pkgdir"
+ /usr/bin/perl Build
}
check() {
cd [% distdir %]
- make test
+ sanitize
+ /usr/bin/perl Build test
}
package() {
cd [% distdir %]
- make install DESTDIR="$pkgdir"
+ sanitize
+ /usr/bin/perl Build install
find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}