summaryrefslogtreecommitdiff
path: root/libraries/OpenBLAS/OpenBLAS.SlackBuild
diff options
context:
space:
mode:
authorMario Antunes <mariolpantunes@gmail.com>2014-10-02 01:10:33 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-10-03 10:17:00 +0700
commitf0e9be9d947486cc3f22516580f657d934fb62d4 (patch)
treee095dfeac7736a9baed5fc779b20c1ee4d1c23cd /libraries/OpenBLAS/OpenBLAS.SlackBuild
parentb173ef7ec4bcebf9feb10dd1fdbe60b44dfde9c3 (diff)
downloadslackbuilds-f0e9be9d947486cc3f22516580f657d934fb62d4.tar.gz
libraries/OpenBLAS: Added (BLAS library).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/OpenBLAS/OpenBLAS.SlackBuild')
-rw-r--r--libraries/OpenBLAS/OpenBLAS.SlackBuild68
1 files changed, 68 insertions, 0 deletions
diff --git a/libraries/OpenBLAS/OpenBLAS.SlackBuild b/libraries/OpenBLAS/OpenBLAS.SlackBuild
new file mode 100644
index 0000000000..251f4b3975
--- /dev/null
+++ b/libraries/OpenBLAS/OpenBLAS.SlackBuild
@@ -0,0 +1,68 @@
+#!/bin/bash
+#
+# Slackware build script for OpenBLAS
+# Written by Mário Antunes (mariolpantunes@gmail.com)
+
+PRGNAM="OpenBLAS"
+VERSION=${VERSION:-0.2.11}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+make NO_STATIC=1
+make PREFIX=$PKG/usr/ install
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
+ grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README.md $PKG/usr/doc/$PRGNAM-$VERSION/REAME
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+## A little hack to fix the lib path
+if [ "$LIBDIRSUFFIX" = "64" ]; then
+ mv -v $PKG/usr/lib/ $PKG/usr/lib$LIBDIRSUFFIX/
+fi
+
+rm -Rf $PKG/usr/bin
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}