diff options
author | Audrius Kažukauskas <neobug@tornado.ktu.lt> | 2010-05-11 20:01:49 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 20:01:49 +0200 |
commit | 900ae97b15d76bed1e184c7c89d17f3a43e099da (patch) | |
tree | 48d818e8b110a96a47aa590be1f308cd2682adb9 /office/fbreader/fbreader.SlackBuild | |
parent | 85d681f7e6e7fcc342e466ccaaecb00d049da24e (diff) |
office/fbreader: Added to 12.0 repository
Diffstat (limited to 'office/fbreader/fbreader.SlackBuild')
-rw-r--r-- | office/fbreader/fbreader.SlackBuild | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/office/fbreader/fbreader.SlackBuild b/office/fbreader/fbreader.SlackBuild new file mode 100644 index 0000000000000..1d732a0be9501 --- /dev/null +++ b/office/fbreader/fbreader.SlackBuild @@ -0,0 +1,75 @@ +#!/bin/sh + +# Slackware build script for fbreader +# Written by Audrius Kažukauskas <neobug@tornado.ktu.lt> + +PRGNAM=fbreader +VERSION=0.8.8d +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# If you want to build the gtk interface instead, then change this +# value to 'gtk' or run the script like this: +# UI=gtk ./fbreader.SlackBuild +UI=${UI:-qt} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-sources-$VERSION.tgz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# We're building for desktop against Qt3 +# If you want to build against GTK+2, just change UI_TYPE to gtk +cat > makefiles/target.mk << EOF +TARGET_ARCH = desktop +UI_TYPE = $UI +TARGET_STATUS = release +EOF + +# Add SLKCFLAGS +sed -i "s|CFLAGS =|CFLAGS = $SLKCFLAGS|" makefiles/arch/desktop.mk + +# Fix all Qt3 related flags +sed -i 's|moc-qt3|moc|' makefiles/arch/desktop.mk +sed -i 's|-I /usr/include/qt3|$(shell pkg-config --cflags qt-mt)|' makefiles/arch/desktop.mk +sed -i 's|-lqt-mt|$(shell pkg-config --libs qt-mt)|' makefiles/arch/desktop.mk + +make +make install DESTDIR=$PKG + +( 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 +) + +# Fix .desktop file +sed -i 's|^Name=E-book reader|Name=FBReader|' $PKG/usr/share/applications/FBReader.desktop + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README.build fbreader/LICENSE $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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |