blob: e1a292915175d1a63b45c5391f7747a455cb3788 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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:
|