summaryrefslogtreecommitdiff
path: root/community/arpack/PKGBUILD
blob: 0f909d1061ac02423d9fadea41f0e6ecb138c786 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# $Id: PKGBUILD 18351 2010-06-02 21:49:21Z shusmann $
# Contributor: William Rea <sillywilly@gmail.com>
# Maintainer: Stefan Husmann  <stefan-husmann@t-online.de>

pkgname=arpack
pkgver=2.1
pkgrel=4
pkgdesc="A collection of Fortran77 subroutines designed to solve large scale eigenvalue problems"
arch=('i686' 'x86_64')
url="http://www.caam.rice.edu/software/ARPACK"
license=('custom:BSD')
depends=('glibc' 'gcc-fortran')
source=(http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz \
	http://www.caam.rice.edu/software/ARPACK/SRC/patch.tar.gz \
	arpack-2.1-redhat.patch \
	license.txt)
md5sums=('fffaa970198b285676f4156cebc8626e'
         '14830d758f195f272b8594a493501fa2'
         '95678954de317c92862bb4f9cc9d04ad'
         '7caaa0099a5c39726f4478a1bde89495')

build() {
  cd $srcdir/ARPACK
  patch -p1 -i ../arpack-2.1-redhat.patch
  mkdir static shared
  cd shared
  for dir in ../SRC ../UTIL; do
    make -f $dir/Makefile VPATH=$dir srcdir=$dir FC=gfortran FFLAGS="-fPIC" \
       single double complex complex16
  done
  gcc -shared -Wl,-soname,libarpack.so.2 -o libarpack.so.2.1 *.o
  cd ..
  cd static
  for dir in ../SRC ../UTIL; do
    make -f $dir/Makefile VPATH=$dir srcdir=$dir FC=gfortran FFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" \
       all
  done
  ar rv libarpack.a *.o
  ranlib libarpack.a
}
package() {
  cd $srcdir/ARPACK
  install -d $pkgdir/usr/lib
  install -p -m644 $srcdir/ARPACK/static/libarpack.a $pkgdir/usr/lib
  install -p -m755 $srcdir/ARPACK/shared/libarpack.so.2.1 $pkgdir/usr/lib
  ln -s libarpack.so.2.1 $pkgdir/usr/lib/libarpack.so.2
  ln -s libarpack.so.2 $pkgdir/usr/lib/libarpack.so
  install -D -m644 $srcdir/license.txt \
    $pkgdir/usr/share/licenses/$pkgname/license.txt
}