slackbuilds_ponce/desktop/obconf/obconf.SlackBuild

62 lines
1.4 KiB
Text
Raw Normal View History

2010-05-11 14:03:46 +02:00
#!/bin/sh
# Slackware build script for obconf
# Written by Chess Griffin <chess@chessgriffin.com>
2010-05-11 14:03:46 +02:00
PRGNAM=obconf
VERSION=2.0.3
ARCH=${ARCH:-i486}
2010-05-11 14:03:46 +02:00
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
2010-05-11 14:03:46 +02:00
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCS="ABOUT-NLS AUTHORS CHANGELOG COPYING README"
2010-05-11 14:03:46 +02:00
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
set -e
2010-05-11 14:03:46 +02:00
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
2010-05-11 14:03:46 +02:00
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
2010-05-11 14:03:46 +02:00
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
2010-05-11 14:03:46 +02:00
make
make install DESTDIR=$PKG
2010-05-11 14:03:46 +02:00
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
2010-05-11 14:03:46 +02:00
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $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
cat $CWD/doinst.sh > $PKG/install/doinst.sh
2010-05-11 14:03:46 +02:00
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz