pkgname=perl-pegex pkgver=0.19 pkgrel=1 pkgdesc="Pegex Parser Generator" arch=('i686' 'x86_64') url="http://search.cpan.org/dist/Pegex/" license=('perl') depends=('perl>=5.8.3') provides=('perl-pegex-bootstrap' 'perl-pegex-compiler' 'perl-pegex-grammar' 'perl-pegex-grammar-atoms' 'perl-pegex-input' 'perl-pegex-mo' 'perl-pegex-module' 'perl-pegex-parser' 'perl-pegex-parser-indent' 'perl-pegex-pegex-ast' 'perl-pegex-pegex-grammar' 'perl-pegex-receiver' 'perl-pegex-regex') options=(!emptydirs) source=('http://search.cpan.org/CPAN/authors/id/I/IN/INGY/Pegex-0.19.tar.gz') md5sums=('921062ca823b87bd173e99f7a6284c09') build() { _dir=$(find $srcdir -maxdepth 2 -type f -name 'Makefile.PL') if [ ! -z "$_dir" ]; then cd $(dirname "$_dir") PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor make make install DESTDIR="${pkgdir}" else _dir=$(find $srcdir -maxdepth 2 -type f -name 'Build.PL') if [ ! -z "$_dir" ]; then cd $(dirname "$_dir") PERL_MM_USE_DEFAULT=1 perl Build.PL INSTALLDIRS=vendor ./Build ./Build install destdir=${pkgdir} else echo "error: failed to detect build method for $pkgname" echo "you may be able to fix this by editing the PKGBUILD" return 1 fi fi # remove perllocal.pod and .packlist find ${pkgdir} -name perllocal.pod -delete find ${pkgdir} -name .packlist -delete }