1 # Contributor: Giuseppe Borzi <gborzi@ieee.org>
5 pkgdesc="Parallel subroutines to solve a sparse linear system on shared memory computer"
7 url="http://crd.lbl.gov/~xiaoye/SuperLU/"
9 depends=('gcc-libs' 'blas')
12 install=${pkgname}.install
13 source=(http://crd.lbl.gov/~xiaoye/SuperLU/${pkgname}_$pkgver.tar.gz http://crd.lbl.gov/~xiaoye/SuperLU/License.txt arch.patch)
14 md5sums=('a1cf0dba3308a2e4a0a7290714f1799d'
15 'f78e2ac527dbb50f53766475a9c542bd'
16 '4c8cec36828957803a8c2bd262a84724')
19 cd "$srcdir/SuperLU_MT_$pkgver"
20 patch -Np1 -i $srcdir/arch.patch
22 mkdir -p shared static
23 msg "Building shared library..."
25 make -f ../SRC/Makefile VPATH=../SRC srcdir=../SRC \
26 CFLAGS="$CFLAGS -fPIC -D_PTHREAD" NOOPTS="-fPIC"\
27 ARCH="echo" ARCHFLAGS="" RANLIB="echo" \
28 SUPERLULIB=$srcdir/SuperLU_MT_$pkgver/lib/lib$pkgname.a
29 gcc -shared -Wl,-soname,lib$pkgname.so.2 -o ../lib/lib$pkgname.so.2.0 *.o \
32 msg "Building static library..."
33 make -f ../SRC/Makefile VPATH=../SRC srcdir=../SRC \
34 CFLAGS="$CFLAGS -D_PTHREAD" SUPERLULIB=lib$pkgname.a
35 msg "Testing library..."
39 LS_COLORS="" make CFLAGS="-O2"
40 if [ "x`grep failed *.out`" != "x" ]; then
47 mkdir -p $pkgdir/usr/lib $pkgdir/usr/include/$pkgname \
48 $pkgdir/usr/share/doc/$pkgname $pkgdir/usr/share/licenses/$pkgname
49 install -p -m644 $srcdir/SuperLU_MT_$pkgver/lib/lib$pkgname.a $pkgdir/usr/lib
50 install -p -m755 $srcdir/SuperLU_MT_$pkgver/lib/lib$pkgname.so.2.0 $pkgdir/usr/lib
52 ln -s lib$pkgname.so.2.0 lib$pkgname.so.2
53 ln -s lib$pkgname.so.2 lib$pkgname.so
54 install -m644 $srcdir/SuperLU_MT_$pkgver/SRC/*.h $pkgdir/usr/include/$pkgname
55 install -m644 $srcdir/SuperLU_MT_$pkgver/DOC/ug.pdf $pkgdir/usr/share/doc/$pkgname/
56 install -m644 $srcdir/SuperLU_MT_$pkgver/README $pkgdir/usr/share/doc/$pkgname
57 install -m644 $srcdir/License.txt $pkgdir/usr/share/licenses/$pkgname
60 # vim:set ts=2 sw=2 et: