mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-04 00:56:07 +01:00
834e79ae02
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
87 lines
2.6 KiB
Bash
87 lines
2.6 KiB
Bash
#!/bin/sh
|
||
|
||
# Slackware build script for libtbb
|
||
|
||
# Written by João Felipe Santos (joao.eel@gmail.com)
|
||
# Copyright (c) 2010 João Felipe Santos
|
||
# Copyright (c) 2011 Ozan Türkyılmaz
|
||
# Maintained by Ozan Türkyılmaz <ozan.turkyilmaz@gmail.com>
|
||
|
||
# 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
|
||
VERSION=3.0_20110315oss
|
||
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
|
||
rm -rf tbb$(echo $VERSION | sed 's/\.//')oss
|
||
tar xvf $CWD/tbb$(echo $VERSION | sed 's/\.//')_src.tgz
|
||
cd tbb$(echo $VERSION | sed 's/\.//')
|
||
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}
|