office/qamus: Added (desktop dictionary)

Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
Benjamin Trigona-Harany 2011-07-10 09:26:16 -03:00 committed by Niels Horn
parent 26bc370ad6
commit 9a4660332e
5 changed files with 136 additions and 0 deletions

15
office/qamus/README Normal file
View file

@ -0,0 +1,15 @@
Qamus is a simple Qt dictionary program which supports the Xdxf standard
as well as a custom qlx format. Qamus provides incremental and fuzzy
searches.
Qamus also supports rule-based searching to match misspelt words. Search
rules are defined in a separate XML file. Sample rule (qrx) and dictionary
(qlx) files are installed to /usr/doc/qamus-VERSION).
The tre regexp matching library and the icu4c unicode library (both
available as SlackBuilds) are recommended but are not manditory.
ICU and tre library support can be disabled by passing ICU=no and TRE=no
to the Slackbuild.
Dictionaries can be downloaded at: http://xdxf.revdanica.com/down/

7
office/qamus/doinst.sh Normal file
View file

@ -0,0 +1,7 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi

View file

@ -0,0 +1,85 @@
#!/bin/sh
# Written by Benjamin Trigona-Harany <bosth@alumni.sfu.ca>
PRGNAM=qamus
VERSION=${VERSION:-0.3.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
# disable ICU or TRE support (automatic if they don't exist)
ICU=${ICU:-yes}
TRE=${TRE:-yes}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
QMAKEARGS="PREFIX=/usr"
if [ "$ICU" = "no" ] ; then
QMAKEARGS="$QMAKEARGS -config disable-icu"
fi
if [ "$TRE" = "no" ] ; then
QMAKEARGS="$QMAKEARGS -config disable-tre"
fi
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) export ARCH=i486 ;;
arm*) export ARCH=arm ;;
*) export ARCH=$( uname -m ) ;;
esac
fi
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"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
chmod 644 *
qmake $QMAKEARGS
#use our CFLAGS
sed -i "/C[X]*FLAGS/s|\ =\ |\ +=\ |" Makefile.Release
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
make release
make install INSTALL_ROOT=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
cp -a \
CHANGELOG INSTALL README \
$PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
data/sample.qlx data/sample.qrx \
$PKG/usr/doc/$PRGNAM-$VERSION/examples
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.${PKGTYPE:-tgz}

10
office/qamus/qamus.info Normal file
View file

@ -0,0 +1,10 @@
PRGNAM="qamus"
VERSION="0.3.2"
HOMEPAGE="http://ben.trigona.ca/qamus.html"
DOWNLOAD="http://ben.trigona.ca/files/qamus-0.3.2.tar.bz2"
MD5SUM="accd4dffc5b7c6a9506f6cecad209f47"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="bosth@alumni.sfu.ca"
APPROVED="Niels Horn"

19
office/qamus/slack-desc Normal file
View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
qamus: qamus (a desktop dictionary)
qamus:
qamus: Qamus is a simple Qt dictionary program which supports the Xdxf
qamus: standard as well as a custom qlx format. Qamus provides incremental
qamus: search, fuzzy searching and minimisation to the system tray. Qamus
qamus: also supports rule-based searching to match misspelt words.
qamus:
qamus: Homepage: http://gitorious.org/qamus
qamus:
qamus:
qamus: