1 # PKGBUILD generated by pacpan
2 # Modified by Jonathas Rodrigues
3 pkgname=perl-text-findindent
4 _realname=Text-FindIndent
7 pkgdesc="'Heuristically determine the indent style'"
10 url="http://search.cpan.org/~smueller/Text-FindIndent"
13 depends=('perl>=5.10.1')
16 #provides=('Text-FindIndent')
17 provides=('text-findindent=0.10' 'Text::FindIndent=0.10' 'perl-text-findindent=0.10')
19 source=('http://search.cpan.org/CPAN/authors/id/S/SM/SMUELLER/Text-FindIndent-0.10.tar.gz')
21 md5sums=('765d619fc84e07b3c1e3ac6841e6a6b8')
24 _expected_dir="${srcdir}/${_realname}-${pkgver}"
25 if [ -d "$_expected_dir" ]; then
28 _expected_dir="${srcdir}/$(bsdtar -t -f $(basename $source) | head -n1)"
29 if [ -d "$_expected_dir" ]; then
32 _makefile=$(find $srcdir -iname Makefile.PL)
33 if [ ! -z "$_makefile" ]; then
34 _expected_dir=$(dirname $_makefile)
35 if [ -d "$_expected_dir" ]; then
38 echo "
\e[1;31mERROR
\e[0m unable to detect source directory"
39 echo "
\e[1;34m-->
\e[0m this is often due to CPAN's lack of standard naming conventions"
40 echo "
\e[1;34m-->
\e[0m it may be possible to fix this by adjusting the build function in the PKGBUILD"
45 # install module in vendor directories.
46 PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
48 make install DESTDIR=${pkgdir} || return 1
50 # remove perllocal.pod and .packlist
51 find ${pkgdir} -name perllocal.pod -delete
52 find ${pkgdir} -name .packlist -delete
55 # vim:set ts=2 sw=2 et: