2012-02-22 14:16:46 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for fbpic
|
|
|
|
|
|
|
|
# Written by K.D.Hedger kdhedger@yahoo.co.uk
|
|
|
|
|
2021-01-22 21:21:36 +01:00
|
|
|
# 20210122 bkw: modified by SlackBuilds.org: This has been broken
|
|
|
|
# for years and nobody complained. Made it build, and use standard
|
|
|
|
# SLKCFLAGS.
|
|
|
|
|
2012-02-22 14:16:46 +01:00
|
|
|
PRGNAM=fbpic
|
2017-03-21 04:44:19 +01:00
|
|
|
VERSION=${VERSION:-0.0.2}
|
2021-01-22 21:21:36 +01:00
|
|
|
BUILD=${BUILD:-2}
|
2012-02-22 14:16:46 +01:00
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2017-03-21 04:44:19 +01:00
|
|
|
i?86) ARCH=i586 ;;
|
2012-02-22 14:16:46 +01:00
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2017-03-21 04:44:19 +01:00
|
|
|
if [ "$ARCH" = "i586" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
2012-02-22 14:16:46 +01:00
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
2021-01-22 21:21:36 +01:00
|
|
|
SLKCFLAGS="-O2 -fPIC"
|
2012-02-22 14:16:46 +01:00
|
|
|
LIBDIRSUFFIX="64"
|
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
fi
|
|
|
|
|
2021-01-22 21:21:36 +01:00
|
|
|
set -e
|
|
|
|
|
2012-02-22 14:16:46 +01:00
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$VERSION
|
2021-01-22 21:21:36 +01:00
|
|
|
mkdir $PRGNAM-$VERSION
|
2012-02-22 14:16:46 +01:00
|
|
|
cd $PRGNAM-$VERSION
|
2021-01-22 21:21:36 +01:00
|
|
|
tar xvf $CWD/$PRGNAM.tgz
|
2012-02-22 14:16:46 +01:00
|
|
|
chown -R root:root .
|
2021-01-22 21:21:36 +01:00
|
|
|
chmod 644 *
|
2012-02-22 14:16:46 +01:00
|
|
|
|
2021-01-22 21:21:36 +01:00
|
|
|
make CXXFLAGS="$SLKCFLAGS"
|
2012-02-22 14:16:46 +01:00
|
|
|
make install PREFIX=/usr DESTDIR=$PKG
|
|
|
|
|
2021-01-22 21:21:36 +01:00
|
|
|
gzip -9 $PKG/usr/man/man?/*.?
|
2012-02-22 14:16:46 +01:00
|
|
|
|
|
|
|
mkdir -p $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
|
2017-03-21 04:44:19 +01:00
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
2012-02-22 14:16:46 +01:00
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|