summaryrefslogtreecommitdiff
path: root/system/qstardict/qstardict.SlackBuild
diff options
context:
space:
mode:
authorgrissiom <chaos.proton@gmail.com>2010-05-13 00:41:34 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:41:34 +0200
commit7ce709341bbd23bc83c41d4c623adc818d434c92 (patch)
tree31b23f28955ada1440307344edc8a6afe8c8ef7c /system/qstardict/qstardict.SlackBuild
parent620e0ebf06e384a100721649e04b291fe5d0ae3e (diff)
downloadslackbuilds-7ce709341bbd23bc83c41d4c623adc818d434c92.tar.gz
system/qstardict: Updated for version 0.13.1
Diffstat (limited to 'system/qstardict/qstardict.SlackBuild')
-rw-r--r--system/qstardict/qstardict.SlackBuild44
1 files changed, 34 insertions, 10 deletions
diff --git a/system/qstardict/qstardict.SlackBuild b/system/qstardict/qstardict.SlackBuild
index 1f9e8fc009..3883e62600 100644
--- a/system/qstardict/qstardict.SlackBuild
+++ b/system/qstardict/qstardict.SlackBuild
@@ -5,9 +5,9 @@
# Written by grissiom chaos.proton@gmail.com
PRGNAM=qstardict
-VERSION=${VERSION:-0.12.9}
+VERSION=${VERSION:-0.13.1}
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -15,12 +15,17 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+BUILD_PLASMOID=${BUILD_PLASMOID:-"yes"}
+
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
@@ -38,11 +43,35 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-qmake-qt4 QMAKE_CXXFLAGS="$SLKCFLAGS" || qmake QMAKE_CXXFLAGS="$SLKCFLAGS"
+# qstardict only have "stardict" and "web" plugins enabled by default.
+# Actually there are swac and multitran plugins in addition.
+# Uncomment the following line to get full plugins.
+# enabled_plugins="stardict web swac multitran"
+qmake QMAKE_CXXFLAGS="$SLKCFLAGS" \
+ PLUGINS_DIR=/usr/lib${LIBDIRSUFFIX}/qstardict/plugins \
+ DOCS_DIR=/usr/doc/$PRGNAM-$VERSION \
+ ENABLED_PLUGINS=$enabled_plugins
make
make install INSTALL_ROOT=$PKG
+if [ "$BUILD_PLASMOID" = "yes" ]; then
+ mkdir kdeplasma/build
+ cd kdeplasma/build
+ # Fix the plugin path or LIB_INSTALL_DIR will have no effect...
+ (cd ../dataengine
+ sed -i -e '4d' -e 's.//..' config.h.cmake
+ )
+
+ cmake -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ ..
+ make
+ make install DESTDIR=$PKG
+ cd -
+fi
+
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null || true
@@ -50,16 +79,11 @@ make install INSTALL_ROOT=$PKG
xargs strip --strip-unneeded 2> /dev/null
)
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- AUTHORS ChangeLog COPYING INSTALL README THANKS \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-rm -rf $PKG/usr/share/doc
-( cd $PKG/usr/doc ; ln -s $PRGNAM-$VERSION $PRGNAM )
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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}