#!/bin/sh # Heavily based on the Slackware 11.0 SlackBuild # http://www.scribus.org.uk/index.php CWD=`pwd` if ["$TMP" = ""]; then TMP=/tmp fi PKG=$TMP/package-scribus NAME=scribus VERSION=1.3.4 ARCH=i686 BUILD=1ms if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xjvf $CWD/$NAME-$VERSION.tar.bz2 cd $NAME-$VERSION cmake . -DCMAKE_INSTALL_PREFIX:PATH=/usr make make install DESTDIR=$PKG mv $PKG/usr/share/man $PKG/usr mv $PKG/usr/share/doc $PKG/usr mkdir -p $PKG/usr/share/applications cat $CWD/scribus.desktop > $PKG/usr/share/applications/scribus.desktop ( 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 ) ( cd $PKG/usr/man find . -name "*.?" | xargs gzip -9 ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $CWD cp -a *.SlackBuild slack-desc $PKG/usr/doc/$NAME-$VERSION cd $PKG chown -R root:root . requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$NAME-$VERSION rm -rf $PKG fi