#!/bin/sh # Heavily based on the Slackware 12.2 SlackBuild NAME=panini VERSION=0.62 SUBVERSION=.83 ARCH=${ARCH:-i486} BUILD=${BUILD:-1}la CWD=`pwd` QT4PATH=/opt/qt4/bin SOURCE=http://downloads.sourceforge.net/pvqt/$NAME-$VERSION$SUBVERSION-src.zip if [ ! -e $CWD/$NAME-$VERSION$SUBVERSION-src.zip ]; then wget $SOURCE fi if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-$NAME if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf $NAME-$VERSION unzip -e $CWD/$NAME-$VERSION$SUBVERSION-src.zip cd $NAME-$VERSION chown -R root:root . lrelease panini.pro || exit 1 $QT4PATH/qmake PREFIX=$PKG/usr || exit 1 make || exit 1 cp -r bin $PKG || exit 1 echo "=====================================================================" echo "Stripping...." echo "=====================================================================" ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) cd $TMP/$NAME-$VERSION echo "=====================================================================" echo "Current dir.... = "`pwd` echo "=====================================================================" mkdir -p $PKG/usr/doc/$NAME-$VERSION$SUBVERSION cp -a panini-build.txt panini-$VERSION-release.txt panini-usage.txt GPLversion3.txt $PKG/usr/doc/$NAME-$VERSION$SUBVERSION cp $CWD/$NAME.SlackBuild $PKG/usr/doc/$NAME-$VERSION$SUBVERSION/ chmod 644 $PKG/usr/doc/$NAME-$VERSION$SUBVERSION/* mkdir -p $PKG/install chmod 644 $CWD/slack-desc cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION$SUBVERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$NAME-$VERSION rm -rf $PKG fi