summaryrefslogtreecommitdiff
path: root/extra/blas/PKGBUILD
blob: 68c7103db66e3f06e72f2bae349a4fdcb57f114a (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
51
52
# $Id: PKGBUILD 130989 2011-07-09 12:22:58Z ronald $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Jason Taylor <jftaylor21@gmail.com>

pkgname=blas
pkgver=3.4.1
pkgrel=1
url="http://www.netlib.org/blas"
makedepends=('gcc-fortran')
depends=('gcc-libs')
pkgdesc="Basic Linear Algebra Subprograms"
arch=('i686' 'x86_64' 'mips64el')
license=("custom")
source=(http://www.netlib.org/lapack/lapack-${pkgver}.tgz
        Makefile.blas
        LICENSE.blas)
sha1sums=('c115223ac1bac9ab971aae865d3e95442bc979bc'
          'f9eb47d6713894eaaffbf2d9b2942a777e3f5ef9'
          '2491a151a37f0162b25fc4e4e9a8ac444b574a76')
	
build() {
  cd "${srcdir}/lapack-${pkgver}"
  cp -f "${srcdir}/Makefile.blas" BLAS/SRC/Makefile 
  cp -f INSTALL/make.inc.gfortran make.inc

  export FC=gfortran

  pushd BLAS/SRC
  make clean
#  FFLAGS="${CFLAGS/-O?/-O0}" make dcabs1.o
  FFLAGS="${CFLAGS} -fPIC" CFLAGS="${CFLAGS} -fPIC" CXXFLAGS="${CXXFLAGS} -fPIC" make shared
  cp libblas.so.${pkgver} "${srcdir}/lapack-${pkgver}/"

  popd
  ln -s libblas.so.${pkgver} libblas.so

}

package_blas() {
  install -m755 -d "${pkgdir}/usr/lib"
  install -m755 "${srcdir}/lapack-${pkgver}/libblas.so.${pkgver}" \
    "${pkgdir}/usr/lib/"
  ln -sf libblas.so.${pkgver} "${pkgdir}/usr/lib/libblas.so"
  ln -sf libblas.so.${pkgver} "${pkgdir}/usr/lib/libblas.so.3"
  
  install -m755 -d "${pkgdir}/usr/share/licenses/blas"
  install -m644 "${srcdir}/LICENSE.blas" \
    "${pkgdir}/usr/share/licenses/blas/LICENSE"
}