diff options
Diffstat (limited to 'abs/core/lapack/PKGBUILD')
-rw-r--r-- | abs/core/lapack/PKGBUILD | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/abs/core/lapack/PKGBUILD b/abs/core/lapack/PKGBUILD new file mode 100644 index 0000000..145e85f --- /dev/null +++ b/abs/core/lapack/PKGBUILD @@ -0,0 +1,84 @@ +# $Id: PKGBUILD 94550 2010-10-08 09:23:08Z 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> + +pkgbase=lapack +pkgname=('blas' 'lapack') +pkgver=3.2.2 +pkgrel=2 +url="http://www.netlib.org/lapack" +makedepends=('gcc-fortran') +arch=('i686' 'x86_64') +license=("custom") +source=(http://www.netlib.org/${pkgbase}/${pkgbase}-${pkgver}.tgz + lapack-3.1.1-make.inc.patch + Makefile.blas + Makefile.lapack + LICENSE.blas) +md5sums=('10832891c9e8100f81108c1ec7da0da4' + 'cdfcb9d9b162c18d9acbf63c5579ea26' + '51a84dd3b1f04289b6b7c7f56d59c368' + 'e7936c82c853870f0144f45e9656a7ea' + '38b6acb8ed5691d25863319d30a8b365') + +build() { + cd "${srcdir}/${pkgbase}-${pkgver}" + patch -Np1 -i "${srcdir}/lapack-3.1.1-make.inc.patch" + cp -f INSTALL/make.inc.gfortran make.inc + cp -f "${srcdir}/Makefile.blas" BLAS/SRC/Makefile + cp -f "${srcdir}/Makefile.lapack" SRC/Makefile + + export FC=gfortran + + pushd BLAS/SRC + make clean + FFLAGS="${CFLAGS/-O?/-O0}" make dcabs1.o + FFLAGS="${CFLAGS} -fPIC" CFLAGS="${CFLAGS} -fPIC" make shared + cp libblas.so.${pkgver} "${srcdir}/${pkgbase}-${pkgver}/" + popd + ln -s libblas.so.${pkgver} libblas.so + + pushd INSTALL + make clean + make NOOPT="${CFLAGS/-O?/-O0} -fPIC" OPTS="${CFLAGS} -fPIC" + popd + # make sure no files with '_', *vxx.o *vfx.o and *2.O as defined in *ASRC + # are in OBJS + pushd SRC + make clean + + make FFLAGS="${CFLAGS} -fPIC" CFLAGS="${CFLAGS} -fPIC" shared + cp liblapack.so.${pkgver} "${srcdir}/${pkgbase}-${pkgver}/" + popd +} + +package_blas() { + pkgdesc="Basic Linear Algebra Subprograms" + depends=('gcc-libs>=4.5.0') + options=('force') + install -m755 -d "${pkgdir}/usr/lib" + install -m755 "${srcdir}/${pkgbase}-${pkgver}/libblas.so.${pkgver}" \ + "${pkgdir}/usr/lib/" || return 1 + 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" || return 1 +} + +package_lapack() { + pkgdesc="Linear Algebra PACKage" + depends=("blas=${pkgver}") + install -m755 -d "${pkgdir}/usr/lib" + install -m755 "${srcdir}/${pkgbase}-${pkgver}/liblapack.so.${pkgver}" \ + "${pkgdir}/usr/lib/" || return 1 + ln -sf liblapack.so.${pkgver} "${pkgdir}/usr/lib/liblapack.so" + ln -sf liblapack.so.${pkgver} "${pkgdir}/usr/lib/liblapack.so.3" + + install -m755 -d "${pkgdir}/usr/share/licenses/lapack" + install -m644 "${srcdir}/${pkgbase}-${pkgver}/LICENSE" \ + "${pkgdir}/usr/share/licenses/lapack/" || return 1 +} |