summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD51
2 files changed, 43 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3c1cf54e6752..a8dad63b82a5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,16 @@
pkgbase = perl-role-basic
pkgdesc = Just roles. Nothing else.
pkgver = 0.13
- pkgrel = 1
+ pkgrel = 2
url = http://search.cpan.org/~ovid/Role-Basic-0.13
arch = any
license = GPL
license = PerlArtistic
+ checkdepends = perl-test-simple
+ makedepends = perl-module-build
+ depends = perl
options = !emptydirs
+ options = purge
source = http://search.cpan.org/CPAN/authors/id/O/OV/OVID/Role-Basic-0.13.tar.gz
md5sums = 2985fbb47bd0a862bd56bc7cbba6e673
diff --git a/PKGBUILD b/PKGBUILD
index 78af02738126..257660a4efaf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Pappy STÄ‚NESCU <pappy@ascelion.com>
+# Maintainer: pappy <pa314159@users.noreply.github.com>
_cpan_name=Role-Basic
_cpan_desc="Just roles. Nothing else."
@@ -6,33 +6,58 @@ _cpan_author=ovid
_cpan_version=0.13
_cpan_md5=2985fbb47bd0a862bd56bc7cbba6e673
-pkgrel=1
+pkgrel=3
pkgname=perl-${_cpan_name,,}
pkgdesc=$_cpan_desc
pkgver=$_cpan_version
md5sums=($_cpan_md5)
-depends=('')
-makedepends=('')
-checkdepends=()
+depends=('perl')
+makedepends=('perl-module-build')
+checkdepends=('perl-test-simple')
_cpan_path=${_cpan_author:0:1}/${_cpan_author:0:2}/${_cpan_author}
url="http://search.cpan.org/~${_cpan_author}/${_cpan_name}-$pkgver"
source=("http://search.cpan.org/CPAN/authors/id/${_cpan_path^^}/${_cpan_name}-$pkgver.tar.gz")
-license=("GPL" "PerlArtistic")
-options=(!emptydirs)
+license=('GPL' 'PerlArtistic')
+options=(!emptydirs purge)
arch=('any')
build() {
- cd $srcdir/${_cpan_name}-$pkgver
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
- make
- make test
+ cd $srcdir/${_cpan_name}-$pkgver
+
+ unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
+ export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
+ if [[ -f Build.PL ]]; then
+ perl Build.PL
+ ./Build
+ else
+ perl Makefile.PL
+ make
+ fi
+}
+
+check() {
+ cd $srcdir/${_cpan_name}-$pkgver
+
+ unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
+ export PERL_MM_USE_DEFAULT=1
+ if [[ -f Build.PL ]]; then
+ ./Build test
+ else
+ make test
+ fi
}
package() {
- cd $srcdir/${_cpan_name}-$pkgver
- make install DESTDIR=$pkgdir
+ cd $srcdir/${_cpan_name}-$pkgver
+
+ unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
+ if [[ -f Build.PL ]]; then
+ ./Build install --installdirs=vendor --destdir="$pkgdir"
+ else
+ make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
+ fi
}