48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
# Slackware build script for sfarkxtc
|
||
|
|
||
|
PRGNAM=sfarkxtc
|
||
|
VERSION=20070326
|
||
|
ARCH=${ARCH:-i486}
|
||
|
BUILD=${BUILD:-1}
|
||
|
TAG=${TAG:-_SBo}
|
||
|
|
||
|
CWD=$(pwd)
|
||
|
TMP=${TMP:-/tmp/SBo}
|
||
|
PKG=$TMP/package-$PRGNAM
|
||
|
OUTPUT=${OUTPUT:-/tmp}
|
||
|
|
||
|
if [ "$ARCH" = "i486" ]; then
|
||
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||
|
elif [ "$ARCH" = "i686" ]; then
|
||
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||
|
elif [ "$ARCH" = "x86_64" ]; then
|
||
|
SLKCFLAGS="-O2 -fPIC"
|
||
|
fi
|
||
|
|
||
|
set -e
|
||
|
|
||
|
rm -rf $PKG
|
||
|
mkdir -p $TMP $PKG $OUTPUT
|
||
|
cd $TMP
|
||
|
rm -rf $PRGNAM-$VERSION
|
||
|
mkdir $PRGNAM-$VERSION
|
||
|
cd $PRGNAM-$VERSION
|
||
|
tar xvf $CWD/${PRGNAM}_lx86.tar.gz
|
||
|
chown -R root:root .
|
||
|
chmod -R u+w,go+r-w,a-s .
|
||
|
|
||
|
find $PKG | xargs 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/bin $PKG/usr/doc/$PRGNAM-$VERSION
|
||
|
cp -a sfarkxtc $PKG/usr/bin
|
||
|
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}
|