summaryrefslogtreecommitdiff
path: root/office/fbreader/fbreader.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/fbreader/fbreader.SlackBuild')
-rw-r--r--office/fbreader/fbreader.SlackBuild24
1 files changed, 15 insertions, 9 deletions
diff --git a/office/fbreader/fbreader.SlackBuild b/office/fbreader/fbreader.SlackBuild
index 15de09985c..8199f255ca 100644
--- a/office/fbreader/fbreader.SlackBuild
+++ b/office/fbreader/fbreader.SlackBuild
@@ -1,10 +1,12 @@
#!/bin/sh
# Slackware build script for fbreader
-# Written by Audrius Kažukauskas <audrius@neutrino.lt>
+# Originally written by Audrius Kazukauskas <audrius@neutrino.lt>
+# Maintained as of version 0.12.1 by Niels Horn <niels.horn@gmail.com>
+# revision date: 2010/02/11
PRGNAM=fbreader
-VERSION=0.10.7
+VERSION=0.12.2
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -17,13 +19,17 @@ 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
-# (or UI=qt4 for those who have Qt4 from -current)
-UI=${UI:-qt}
+UI=${UI:-qt4}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e # Exit on most errors
@@ -37,7 +43,7 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# We're building for desktop against Qt3
+# We're building for desktop against Qt4
# If you want to build against GTK+2, just change UI_TYPE to gtk
cat > makefiles/target.mk << EOF
TARGET_ARCH = desktop
@@ -48,7 +54,7 @@ EOF
# Add SLKCFLAGS
sed -i "s|CFLAGS =|CFLAGS = $SLKCFLAGS|" makefiles/arch/desktop.mk
-# Fix all Qt3 related flags
+# Fix all Qt3 related flags (just in case)
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
@@ -58,8 +64,8 @@ sed -i 's|moc-qt4|moc|' makefiles/arch/desktop.mk
sed -i 's|-I /usr/include/qt4|$(shell pkg-config --cflags QtGui)|' makefiles/arch/desktop.mk
sed -i 's|-lQtGui|$(shell pkg-config --libs QtGui)|' makefiles/arch/desktop.mk
-make
-make install DESTDIR=$PKG
+make LIBDIR=/usr/lib${LIBDIRSUFFIX}
+make install LIBDIR=/usr/lib${LIBDIRSUFFIX} DESTDIR=$PKG
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
@@ -80,4 +86,4 @@ 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
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}