#!/bin/sh # # $Id: skim.SlackBuild 2006-10-15 01:04:00 PM EDT JohnB316 $ # CWD=`pwd` NAME=skim if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-$NAME # # These variables should be changed for the packager and the arguments # to be passed to the ./configure script. They will also be appended # to the end of the slack-desc file. # VL_PACKAGER=JohnB316 VERSION=1.4.5 ARCH=i586 BUILD=1vl59 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG cd $TMP tar xjvf $CWD/$NAME-$VERSION.tar.bz2 cd $NAME-$VERSION chown -R root.root . if [ ! -r configure ]; then sh autogen.sh fi export CFLAGS="-O2 -march=i586 -mtune=i686" export CXXFLAGS=$CFLAGS scons configure prefix=/usr kdeincludes=/usr/include qtincludes=/usr/lib/qt/include \ kdelibs=/usr/lib qtlibs=/usr/lib/qt/lib || exit 1 scons || exit 1 scons install DESTDIR=$PKG || exit 1 mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a \ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO \ $PKG/usr/doc/$NAME-$VERSION chmod 644 $PKG/usr/doc/$NAME-$VERSION/* gzip -9 $PKG/usr/man/*/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # # append build information to the end of the slack-desc file # cat >> $PKG/install/slack-desc << EOF #---------------------------------------- BUILDDATE: `date` PACKAGER: $VL_PACKAGER HOST: `uname -srm` DISTRO: `cat /etc/vector-version` CFLAGS: $CFLAGS CONFIGURE: `awk "/\.\/configure\ /" $TMP/$NAME-$VERSION/config.log` EOF cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null echo "Generating slapt-get dependencies for $NAME-$VERSION..." requiredbuilder -v -y $PKG echo "Making package: $NAME-$VERSION..." makepkg -l y -c n $TMP/$NAME-$VERSION-$ARCH-$BUILD.tlz