#!/bin/sh # Heavily based on the Slackware 12.1 SlackBuild # http://www.mimec.w.pl/ # Packager Gohanz ( gohanz@infinito.it ) # http://www.slacky.it # Deps: qt4 CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package-fraqtive NAME=fraqtive VERSION=0.4.4 TARGET=i486 ARCH=${ARCH:-i486} BUILD=1as if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvjf $CWD/$NAME-$VERSION.tar.bz2 cd $NAME-$VERSION ./configure \ -prefix /usr \ -qmake /opt/qt4/bin/qmake sed -i s/"-O2"/"$SLKCFLAGS"/ src/Makefile make || exit 1 ( mkdir -p $PKG/usr/bin install -m 755 -p ./release/fraqtive $PKG/usr/bin/fraqtive strip $PKG/usr/bin/fraqtive ) ( mkdir -p $PKG/usr/share/applications/ install -m 644 -p ./src/fraqtive.desktop $PKG/usr/share/applications/ ) ( mkdir -p $PKG/usr/share/icons/hicolor/{16x16,22x22,32x32,48x48}/apps/ install -m 644 -p ./src/icons/fraqtive-16.png $PKG/usr/share/icons/hicolor/16x16/apps/fraqtive.png install -m 644 -p ./src/icons/fraqtive-22.png $PKG/usr/share/icons/hicolor/22x22/apps/fraqtive.png install -m 644 -p ./src/icons/fraqtive-32.png $PKG/usr/share/icons/hicolor/32x32/apps/fraqtive.png install -m 644 -p ./src/icons/fraqtive-48.png $PKG/usr/share/icons/hicolor/48x48/apps/fraqtive.png ) mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a COPYING ChangeLog INSTALL README $PKG/usr/doc/$NAME-$VERSION mkdir -p $PKG/install cat << EOF > $PKG/install/doinst.sh if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database 1> /dev/null &> /dev/null fi if [ -x /usr/bin/gtk-update-icon-cache ]; then /usr/bin/gtk-update-icon-cache -f -q /usr/share/icons/hicolor &> /dev/null fi EOF cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild 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 fi