2010-06-15 07:33:30 +02:00
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
# Slackware build script for libtbb
|
|
|
|
|
|
|
|
|
|
# Written by João Felipe Santos (joao.eel@gmail.com)
|
|
|
|
|
# Copyright (c) 2010 João Felipe Santos
|
2011-05-18 13:09:59 +02:00
|
|
|
|
# Copyright (c) 2011 Ozan Türkyılmaz
|
2010-10-28 18:29:10 +02:00
|
|
|
|
# Maintained by Ozan Türkyılmaz <ozan.turkyilmaz@gmail.com>
|
2010-06-15 07:33:30 +02:00
|
|
|
|
|
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
# in the Software without restriction, including without limitation the rights
|
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
# furnished to do so, subject to the following conditions:
|
|
|
|
|
#
|
|
|
|
|
# The above copyright notice and this permission notice shall be included in
|
|
|
|
|
# all copies or substantial portions of the Software.
|
|
|
|
|
#
|
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
# THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
PRGNAM=libtbb
|
2011-05-18 13:09:59 +02:00
|
|
|
|
VERSION=3.0_20110315oss
|
2010-06-15 07:33:30 +02:00
|
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
|
case "$( uname -m )" in
|
|
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
|
esac
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
|
|
# We'll let the Makefiles handle CFLAGS - they look correct, but they're a
|
|
|
|
|
# bit convoluted anyway...
|
|
|
|
|
if [ "$ARCH" = "i486" ]; then
|
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
|
|
|
LIBDIRSUFFIX="64"
|
|
|
|
|
else
|
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
|
cd $TMP
|
2011-05-18 13:09:59 +02:00
|
|
|
|
rm -rf tbb$(echo $VERSION | sed 's/\.//')oss
|
|
|
|
|
tar xvf $CWD/tbb$(echo $VERSION | sed 's/\.//')_src.tgz
|
|
|
|
|
cd tbb$(echo $VERSION | sed 's/\.//')
|
2010-06-15 07:33:30 +02:00
|
|
|
|
chown -R root:root .
|
|
|
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
|
|
|
|
|
|
make
|
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
|
|
|
|
|
install -m 0755 build/linux_*/*.so* $PKG/usr/lib${LIBDIRSUFFIX}
|
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/include
|
|
|
|
|
cp -a include/tbb $PKG/usr/include
|
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
|
cp -a \
|
|
|
|
|
CHANGES COPYING README doc/* \
|
|
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|