diff options
author | Jean-Francis Roy | 2015-09-13 13:55:25 -0400 |
---|---|---|
committer | Jean-Francis Roy | 2015-09-13 13:55:25 -0400 |
commit | 725bfca8b5e551611d12fd2a44b7bc0209a20ace (patch) | |
tree | be6f140679cc0a12ec3ae092c1938184187faac2 | |
download | aur-725bfca8b5e551611d12fd2a44b7bc0209a20ace.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 54 |
2 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..118759af3961 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = openblas-git + pkgdesc = An optimized BLAS library based on GotoBLAS2 1.13 BSD + pkgver = 0.2.14 + pkgrel = 1 + url = http://www.openblas.net/ + arch = i686 + arch = x86_64 + license = BSD + makedepends = perl + makedepends = gcc-fortran + makedepends = git + depends = gcc-libs + provides = blas=3.5.0 + provides = openblas + conflicts = blas + conflicts = openblas + options = !makeflags + options = !emptydirs + source = OpenBLAS::git+https://github.com/xianyi/OpenBLAS.git + md5sums = SKIP + +pkgname = openblas-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..68550d960a39 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Jean-Francis Roy <jeanfrancisroy _AT_ gmail _DOT_ com> +# Contributor: Giuseppe Borzi <gborzi _AT_ ieee _DOT_ org> +pkgname=openblas-git +_pkgname=OpenBLAS +pkgver=0.2.14 +pkgrel=1 +pkgdesc="An optimized BLAS library based on GotoBLAS2 1.13 BSD " +arch=('i686' 'x86_64') +url="http://www.openblas.net/" +license=('BSD') +depends=('gcc-libs') +makedepends=('perl' 'gcc-fortran' 'git') +provides=('blas=3.5.0' 'openblas') +conflicts=('blas' 'openblas') +options=(!makeflags !emptydirs) +source=($_pkgname::git+https://github.com/xianyi/OpenBLAS.git) +md5sums=('SKIP') + +pkgver() { + cd "$_pkgname" + git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "$srcdir/$_pkgname" + + unset CFLAGS + unset CXXFLAGS + NPROC=`grep "physical id" /proc/cpuinfo|sort|uniq|wc -l` + NCORE4PROC=`grep "cores" /proc/cpuinfo|sort|tail -n 1|sed -e 's/cpu cores.*: //'` + let NCORE=NPROC*NCORE4PROC + make USE_OPENMP=1 NO_LAPACK=1 NUM_THREADS=$NCORE LIBPREFIX=libblas \ + MAJOR_VERSION=3 NO_CBLAS=1 NO_AFFINITY=1 +} + +package() { + cd "$srcdir/$_pkgname" + + NPROC=`grep "physical id" /proc/cpuinfo|sort|uniq|wc -l` + NCORE4PROC=` grep "cores" /proc/cpuinfo|sort|tail -n 1|sed -e 's/cpu cores.*: //'` + let NCORE=NPROC*NCORE4PROC + make PREFIX="$pkgdir/usr" NUM_THREADS=$NCORE LIBPREFIX=libblas \ + MAJOR_VERSION=3 install + rm -f "$pkgdir/usr/include/cblas.h" "$pkgdir"/usr/include/lapacke* + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + cd "$pkgdir/usr/lib/" + ln -sf libblas_*-r$pkgver.a libblas.a + ln -sf libblas_*-r$pkgver.so libblas.so + ln -sf libblas_*-r$pkgver.so libblas.so.3 + sed -i -e "s%$pkgdir%%" "$pkgdir/usr/lib/cmake/openblas/OpenBLASConfig.cmake" +} + +# vim:set ts=2 sw=2 et: |