slackbuilds/UNUSED/xap/goldendict/SlackBuild
2018-04-20 23:02:35 +02:00

56 lines
1.4 KiB
Text
Executable file

#!/bin/sh
CWD=$(pwd)
PRGNAM="goldendict"
VERSION="1.0.1"
BUILD=1
ARCH=$(uname -m)
HOME=/home/cycojesus
TAG=cyco
OUTPUT=/tmp
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
rm -fr $PKG $TMP/$PRGNAM-$VERSION
[ -e $TMP/$PRGNAM-$VERSION ] && rm -fr $TMP/$PRGNAM-$VERSION
[ -e $PKG ] && rm -fr $PKG
mkdir $TMP
mkdir $TMP/$PRGNAM-$VERSION
cp $PRGNAM-$VERSION-src.tar.bz2 $TMP/$PRGNAM-$VERSION
cp *.patch $TMP/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION
bzip2 -cd $PRGNAM-$VERSION-src.tar.bz2 | tar xvf -
patch < processwrapper.cc.patch
cp qtlocalpeer.cpp.patch qtsingleapplication/src
(cd qtsingleapplication/src && patch < qtlocalpeer.cpp.patch)
qmake
sed -i 's|usr/local|usr|g' Makefile
make
make install INSTALL_ROOT=$PKG
mkdir -p $PKG/install
cat <<EOF > $PKG/install
$PRGNAM: $PRGNAM (dictionary lookup program)
$PRGNAM:
$PRGNAM: A feature-rich dictionary lookup program, supporting multiple dictionary
$PRGNAM: formats (StarDict/Babylon/Lingvo/Dictd) and online dictionaries, featuring
$PRGNAM: perfect article rendering with the complete markup, illustrations and other
$PRGNAM: content retained, and allowing you to type in words without any accents or
$PRGNAM: correct case.
$PRGNAM:
$PRGNAM:
$PRGNAM: http://goldendict.org/
$PRGNAM:
EOF
cd $PKG
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr - .)-$ARCH-$BUILD$TAG.txz