Skip to content

Instantly share code, notes, and snippets.

@hideaki-t
Created October 20, 2011 18:21
Show Gist options
  • Save hideaki-t/1301876 to your computer and use it in GitHub Desktop.
Save hideaki-t/1301876 to your computer and use it in GitHub Desktop.
PKGBUILD for OpenBLAS(based on gotoblas2's PKGBUILD)
# Maintainer: Hideaki Takahashi <[email protected]>
pkgname=openblas
_pkgname=OpenBLAS
pkgver=20111021
pkgrel=1
pkgdesc="OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version"
arch=('i686' 'x86_64')
url="https://github.com/xianyi/OpenBLAS"
license=('custom')
depends=('gcc-libs')
makedepends=('perl')
provides=('blas=3.2.2' 'gotoblas2')
conflicts=('blas')
options=(!makeflags)
_gitroot="git://github.com/xianyi/OpenBLAS.git"
_gitname="OpenBLAS"
build() {
msg "Connecting to the GIT server...."
if [ -d $_gitname ] ; then
cd $_gitname
git pull origin
cd ..
else
git clone $_gitroot --depth=1
fi
msg "Creating build directory..."
#rm -rf $_gitname-build
cp -rH $_gitname $_gitname-build
msg "Starting build..."
cd $_gitname-build
unset CFLAGS
unset CXXFLAGS
make NO_CBLAS=1 NOFORTRAN=2
}
package() {
cd "$_gitname-build"
install -dm755 $pkgdir/usr/include/openblas
install -m644 *.h $pkgdir/usr/include/openblas
install -dm755 $pkgdir/usr/share/licenses/$pkgname/
install -m644 GotoBLAS_00License.txt LICENSE $pkgdir/usr/share/licenses/$pkgname/
install -dm755 $pkgdir/usr/lib
cp -d lib* $pkgdir/usr/lib
ln -s libopenblas.so $pkgdir/usr/lib/libblas.so.3
ln -s libopenblas.a $pkgdir/usr/lib/libblas.a
ln -s libopenblas.a $pkgdir/usr/lib/liblapack.a
ln -sf libblas.so.3 $pkgdir/usr/lib/libblas.so
}
# vim:set ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment