1 # PKGBUILD generated by pacpan
6 pkgdesc="'first class try catch semantics for Perl, without source filters.'"
9 url="http://search.cpan.org/~ash/TryCatch"
12 depends=('perl>=5.8.1' 'perl-scope-upper' 'perl-parse-method-signatures' 'perl-b-hooks-endofscope' 'perl-b-hooks-op-check' 'perl-moosex-types' 'perl-b-hooks-op-ppaddr' 'perl-variable-magic' 'perl-devel-declare' 'perl-moose')
13 makedepends=('perl-b-hooks-op-check' 'perl-extutils-depends' 'perl-b-hooks-op-ppaddr')
15 #provides=('TryCatch')
16 provides=('trycatch=1.002000' 'TryCatch::TypeParser=undef' 'perl-trycatch-typeparser=undef' 'TryCatch::Exception=undef' 'perl-trycatch-exception=undef')
18 source=(http://search.cpan.org/CPAN/authors/id/A/AS/ASH/TryCatch-1.002000.tar.gz)
19 md5sums=('c0069370f5cbd982872702ed4495daf4')
22 _expected_dir="${srcdir}/${_realname}-${pkgver}"
23 if [ -d "$_expected_dir" ]; then
26 _expected_dir="${srcdir}/$(bsdtar -t -f $(basename $source) | head -n1)"
27 if [ -d "$_expected_dir" ]; then
30 _makefile=$(find $srcdir -iname Makefile.PL)
31 if [ ! -z "$_makefile" ]; then
32 _expected_dir=$(dirname $_makefile)
33 if [ -d "$_expected_dir" ]; then
36 echo "
\e[1;31mERROR
\e[0m unable to detect source directory"
37 echo "
\e[1;34m-->
\e[0m this is often due to CPAN's lack of standard naming conventions"
38 echo "
\e[1;34m-->
\e[0m it may be possible to fix this by adjusting the build function in the PKGBUILD"
43 # install module in vendor directories.
44 PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
46 make install DESTDIR=${pkgdir} || return 1
48 # remove perllocal.pod and .packlist
49 find ${pkgdir} -name perllocal.pod -delete
50 find ${pkgdir} -name .packlist -delete
53 # vim:set ts=2 sw=2 et:
54 # END OF PACPAN PKGBUILD