summaryrefslogtreecommitdiff
path: root/system/stardict
diff options
context:
space:
mode:
authorJick Nan <jick.nan@gmail.com>2010-05-11 15:18:45 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 15:18:45 +0200
commit257551902ebec766f6d508ea041238d528acc128 (patch)
treecf601da9b30cf08bc9a741379741ebdf5571f002 /system/stardict
parent3e218e30df1f35208d23b9f084d62d520cffd4df (diff)
downloadslackbuilds-257551902ebec766f6d508ea041238d528acc128.tar.gz
system/stardict: Initial import
Diffstat (limited to 'system/stardict')
-rw-r--r--system/stardict/README6
-rw-r--r--system/stardict/doinst.sh3
-rw-r--r--system/stardict/slack-desc11
-rw-r--r--system/stardict/stardict.SlackBuild66
-rw-r--r--system/stardict/stardict.info8
5 files changed, 94 insertions, 0 deletions
diff --git a/system/stardict/README b/system/stardict/README
new file mode 100644
index 0000000000..dbf8fc225f
--- /dev/null
+++ b/system/stardict/README
@@ -0,0 +1,6 @@
+StarDict is a Cross-Platform and international dictionary written in
+Gtk2. It has powerful features such as "Glob-style pattern matching",
+"Scan selection word," "Fuzzy query," etc.
+
+Notice: You also need to download dictionaries from the StarDict website:
+http://stardict.sourceforge.net
diff --git a/system/stardict/doinst.sh b/system/stardict/doinst.sh
new file mode 100644
index 0000000000..98d466d8b9
--- /dev/null
+++ b/system/stardict/doinst.sh
@@ -0,0 +1,3 @@
+if [ -x usr/bin/update-desktop-database ]; then
+ ./usr/bin/update-desktop-database ./usr/share/applications >/dev/null 2>&1
+fi
diff --git a/system/stardict/slack-desc b/system/stardict/slack-desc
new file mode 100644
index 0000000000..c210ccaa5a
--- /dev/null
+++ b/system/stardict/slack-desc
@@ -0,0 +1,11 @@
+stardict: StarDict
+stardict:
+stardict: StarDict is a Cross-Platform and international dictionary written in
+stardict: Gtk2. It has powerful features such as "Glob-style pattern matching",
+stardict: "Scan selection word," "Fuzzy query," etc.
+stardict:
+stardict: Notice: You need to download dictionaries from the StarDict website:
+stardict: http://stardict.sourceforge.net
+stardict:
+stardict:
+stardict:
diff --git a/system/stardict/stardict.SlackBuild b/system/stardict/stardict.SlackBuild
new file mode 100644
index 0000000000..4b8eb534be
--- /dev/null
+++ b/system/stardict/stardict.SlackBuild
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+# Slackware build script for stardict
+
+# Written by Jick Nan (jick.nan@gmail.com)
+
+PRGNAM=stardict
+VERSION=2.4.8
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+CWD=`pwd`
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP || exit 1
+rm -rf $PRGNAM-$VERSION
+tar -xjvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
+cd $PRGNAM-$VERSION || exit 1
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --disable-gnome-support \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ || exit 1
+
+make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in `find . -type l` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+# Fix path to icon in .desktop file
+sed -i s#'Icon=stardict.png'#'Icon=/usr/share/pixmaps/stardict.png'# \
+ $PKG/usr/share/applications/stardict.desktop || exit 1
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog INSTALL README TODO doc/FAQ doc/HACKING \
+ doc/DICTFILE_FORMAT doc/HowToCreateDictionary $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
diff --git a/system/stardict/stardict.info b/system/stardict/stardict.info
new file mode 100644
index 0000000000..795a3561a7
--- /dev/null
+++ b/system/stardict/stardict.info
@@ -0,0 +1,8 @@
+PRGNAM="stardict"
+VERSION="2.4.8"
+HOMEPAGE="http://stardict.sourceforage.net/"
+DOWNLOAD="http://dl.sourceforge.net/stardict/stardict-2.4.8.tar.bz2"
+MD5SUM="2f743d809737ca157bad71791c45ce63"
+MAINTAINER="Jick Nan"
+EMAIL="jick.nan@gmail.com"
+APPROVED="robw810"