summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorint2017-10-16 00:28:46 +0200
committerint2017-10-16 00:31:15 +0200
commit3f4cecc815c8a2a8e0b62144c0513d09473cc558 (patch)
tree80faef9aa1cd3b07f429f087d01a62e382bd97cf /PKGBUILD
downloadaur-perl-moosex-attribute-env.tar.gz
Perl/CPAN Module MooseX::Attribute::ENV
This is generated via cpan2aur and beside others the cpan2aur-bugfix was added, see https://rt.cpan.org/Public/Bug/Display.html?id=123153 for details and the bugfix for "Can't locate inc/Module/Install.pm in @INC"-compile error, see https://rt.cpan.org/Public/Bug/Display.html?id=120825 for details. Different Perl/CPAN-module, but same problem.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD65
1 files changed, 65 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e1a292915175
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,65 @@
+# Maintainer : int <int [ate] arcor [dot] de>
+# Generator : CPANPLUS::Dist::Arch 1.32
+
+pkgname='perl-moosex-attribute-env'
+pkgver='0.02'
+pkgrel='1'
+pkgdesc="Perl/CPAN Module MooseX::Attribute::ENV: Set default of an attribute to a value from %ENV"
+arch=('any')
+license=('PerlArtistic' 'GPL')
+options=('!emptydirs')
+depends=('perl-moose>=0.48' 'perl>=5.8.6')
+makedepends=()
+url='https://metacpan.org/release/MooseX-Attribute-ENV'
+source=("http://search.cpan.org/CPAN/authors/id/J/JJ/JJNAPIORK/MooseX-Attribute-ENV-$pkgver.tar.gz")
+md5sums=('e26364e1276f24b8df6cbf49b83fd1f6')
+sha512sums=('11c6227736732a9962039ebbcbaa11bf8f17571b0a4c8d390913b4df680d06bd96c4db5243c9a0be3aaea1f646ace745d85929ae957aa523d732ec85293db5de')
+_distdir="MooseX-Attribute-ENV-$pkgver"
+
+prepare() {
+ cd "$srcdir/$_distdir"
+
+ # Patch Makefile.PL
+ # by adding "use lib '.';" before "use inc::Module::Install".
+ # Maybe a real patch-file would be better.
+ #
+ # This fixes the "Can't locate inc/Module/Install.pm in @INC"-error,
+ # which isn't upstream yet, when doing "make".
+ # See https://rt.cpan.org/Public/Bug/Display.html?id=120825
+ # for details on this problem (but for a different Perl/CPAN-module).
+ #
+ sed -i "s/use inc::Module::Install/use lib '.';\nuse inc::Module::Install/" Makefile.PL
+}
+
+build() {
+ ( export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \
+ PERL_AUTOINSTALL=--skipdeps \
+ PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
+ PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
+ MODULEBUILDRC=/dev/null
+
+ cd "$srcdir/$_distdir"
+ /usr/bin/perl Makefile.PL
+ make
+ )
+}
+
+check() {
+ cd "$srcdir/$_distdir"
+ ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
+ make test
+ )
+}
+
+package() {
+ cd "$srcdir/$_distdir"
+ make install
+
+ find "$pkgdir" "(" -name .packlist -o -name perllocal.pod ")" -delete
+}
+
+# Local Variables:
+# mode: shell-script
+# sh-basic-offset: 2
+# End:
+# vim:set ts=2 sw=2 et: