updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / perl-pegex / PKGBUILD
blob44e137c2cc959ef25b6c6ccde078e49fb69ffbe7
1 pkgname=perl-pegex
2 pkgver=0.110.0
3 pkgrel=1
4 pkgdesc="Pegex Parser Generator"
5 arch=('i686' 'x86_64')
6 url="http://search.cpan.org/dist/Pegex/"
7 license=('perl')
8 depends=('perl>=5.8.3')
9 makedepends=('perl-extutils-makemaker>=6.420.0')
10 provides=('perl-pegex-ast' 'perl-pegex-base=0.150.0' 'perl-pegex-compiler' 'perl-pegex-compiler-bootstrap' 'perl-pegex-compiler-grammar' 'perl-pegex-grammar' 'perl-pegex-receiver')
11 options=(!emptydirs)
12 source=('http://search.cpan.org/CPAN/authors/id/I/IN/INGY/Pegex-0.11.tar.gz')
13 md5sums=('13b5924949d3e468420f41ee1fff1d58')
15 build() {
16   _dir=$(find $srcdir -maxdepth 2 -type f -name 'Makefile.PL')
17   if [ ! -z "$_dir" ]; then
18     cd $(dirname "$_dir")
19     PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
20     make 
21     make install DESTDIR="${pkgdir}"
23   else
24   _dir=$(find $srcdir -maxdepth 2 -type f -name 'Build.PL')
25   if [ ! -z "$_dir" ]; then
26     cd $(dirname "$_dir")
27     PERL_MM_USE_DEFAULT=1 perl Build.PL INSTALLDIRS=vendor
28     ./Build 
29     ./Build install destdir=${pkgdir}
31   else
32     echo "error: failed to detect build method for $pkgname"
33     echo "you may be able to fix this by editing the PKGBUILD"
34     return 1
35   fi fi
37   # remove perllocal.pod and .packlist
38   find ${pkgdir} -name perllocal.pod -delete
39   find ${pkgdir} -name .packlist -delete