updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / perl-math-matrixreal / PKGBUILD
blob2a1d4842f6f3a16ab75b9ae7044fa6a649d6f958
1 pkgname=perl-math-matrixreal
2 _realname=Math-MatrixReal
3 pkgver=2.05
4 pkgrel=1
5 pkgdesc="Matrix of Reals in Perl"
6 arch=(i686 x86_64)
7 license=('perl')
8 url="http://search.cpan.org/dist/Math-MatrixReal/"
9 options=(!emptydirs)
11 depends=('perl')
13 provides=('math-matrixreal=2.05' 'Math::MatrixReal=2.05' 'perl-math-matrixreal=2.05')
15 source=(http://search.cpan.org/CPAN/authors/id/L/LE/LETO/Math-MatrixReal-2.05.tar.gz)
17 build() {
18   _expected_dir="${srcdir}/${_realname}-${pkgver}"
19   if [ -d "$_expected_dir" ]; then
20     cd "$_expected_dir"
21   else
22     _expected_dir="${srcdir}/$(bsdtar -t -f $(basename $source) | head -n1)"
23     if [ -d "$_expected_dir" ]; then
24       cd "$_expected_dir"
25     else
26       _makefile=$(find $srcdir -iname Makefile.PL)
27       if [ ! -z "$_makefile" ]; then
28         _expected_dir=$(dirname $_makefile)
29         if [ -d "$_expected_dir" ]; then
30           cd "$_expected_dir"
31         else
32           echo "\e[1;31mERROR\e[0m unable to detect source directory"
33           echo "\e[1;34m-->\e[0m this is often due to CPAN's lack of standard naming conventions"
34           echo "\e[1;34m-->\e[0m it may be possible to fix this by adjusting the build function in the PKGBUILD"
35         fi
36       fi
37     fi
38   fi
39   # install module in vendor directories.
40   PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
41   make  || return 1
42   make install DESTDIR=${pkgdir} || return 1
44   # remove perllocal.pod and .packlist
45   find ${pkgdir} -name perllocal.pod -delete
46   find ${pkgdir} -name .packlist -delete
48 md5sums=('67f23122424830b5eea044f987b892b9')