updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / perl-env-path / PKGBUILD
blob92f7cea4a4ae5b8296e0d81a4adc06a265fe5ccf
1 # PKGBUILD generated by pacpan
2 pkgname=perl-env-path
3 _realname=Env-Path
4 pkgver=0.18
5 pkgrel=2
6 pkgdesc="no description available"
7 arch=(i686 x86_64)
8 license=('unknown: check http://search.cpan.org/src/DSB/Env-Path-0.18/README.txt')
9 url="http://search.cpan.org/~dsb/Env-Path"
10 options=(!emptydirs)
12 depends=('perl')
14 #provides=('Env-Path')
15 provides=('perl-env-path=0.18' 'perl-env-path=0.18')
17 source=(http://search.cpan.org/CPAN/authors/id/D/DS/DSB/Env-Path-0.18.tar.gz)
18 md5sums=('3be7b2f3521eb604d621f6fdf36b86da')
20 build() {
21   _expected_dir="${srcdir}/${_realname}-${pkgver}"
22   if [ -d "$_expected_dir" ]; then
23     cd "$_expected_dir"
24   else
25     _expected_dir="${srcdir}/$(bsdtar -t -f $(basename $source) | head -n1)"
26     if [ -d "$_expected_dir" ]; then
27       cd "$_expected_dir"
28     else
29       _makefile=$(find $srcdir -iname Makefile.PL)
30       if [ ! -z "$_makefile" ]; then
31         _expected_dir=$(dirname $_makefile)
32         if [ -d "$_expected_dir" ]; then
33           cd "$_expected_dir"
34         else
35           echo "ERROR unable to detect source directory"
36           echo "--> this is often due to CPAN's lack of standard naming conventions"
37           echo "--> it may be possible to fix this by adjusting the build function in the PKGBUILD"
38         fi
39       fi
40     fi
41   fi
42   # install module in vendor directories.
43   PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
44   make  || return 1
45   make install DESTDIR=${pkgdir} || return 1
47   # remove perllocal.pod and .packlist
48   find ${pkgdir} -name perllocal.pod -delete
49   find ${pkgdir} -name .packlist -delete
52 # vim:set ts=2 sw=2 et:
53 # END OF PACPAN PKGBUILD