From 84dc4fd03b7985a23f24285c7389e943d943987e Mon Sep 17 00:00:00 2001 From: Roland Suchan Date: Wed, 17 Jul 2024 23:07:33 +0700 Subject: office/qtrans: Added (Offline dictionary). Signed-off-by: Willy Sudiarto Raharjo --- office/qtrans/README | 3 ++ office/qtrans/doinst.sh | 9 +++++ office/qtrans/qtrans.SlackBuild | 85 +++++++++++++++++++++++++++++++++++++++++ office/qtrans/qtrans.info | 10 +++++ office/qtrans/slack-desc | 19 +++++++++ 5 files changed, 126 insertions(+) create mode 100644 office/qtrans/README create mode 100644 office/qtrans/doinst.sh create mode 100644 office/qtrans/qtrans.SlackBuild create mode 100644 office/qtrans/qtrans.info create mode 100644 office/qtrans/slack-desc (limited to 'office/qtrans') diff --git a/office/qtrans/README b/office/qtrans/README new file mode 100644 index 0000000000..9a9489c97b --- /dev/null +++ b/office/qtrans/README @@ -0,0 +1,3 @@ +qtrans is an offline dictionary (word translator written in Qt5/KF5). + +This requires qt5, KF5. diff --git a/office/qtrans/doinst.sh b/office/qtrans/doinst.sh new file mode 100644 index 0000000000..625ced33d1 --- /dev/null +++ b/office/qtrans/doinst.sh @@ -0,0 +1,9 @@ +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi diff --git a/office/qtrans/qtrans.SlackBuild b/office/qtrans/qtrans.SlackBuild new file mode 100644 index 0000000000..5c164e81d5 --- /dev/null +++ b/office/qtrans/qtrans.SlackBuild @@ -0,0 +1,85 @@ +#!/bin/bash + +# Slackware build script for qtrans + +# Written by Roland Suchan (snrd@arcor.de) + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=qtrans +VERSION=${VERSION:-0.3.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "aarch64" ]; 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.gz +cd $PRGNAM-$VERSION + +pwd + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +cmake . -DCMAKE_INSTALL_PREFIX=$PKG/usr + +make +make install + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +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.$PKGTYPE diff --git a/office/qtrans/qtrans.info b/office/qtrans/qtrans.info new file mode 100644 index 0000000000..916f86feb2 --- /dev/null +++ b/office/qtrans/qtrans.info @@ -0,0 +1,10 @@ +PRGNAM="qtrans" +VERSION="0.3.3" +HOMEPAGE="http://sourceforge.net/projects/qtrans0" +DOWNLOAD="https://sourceforge.net/projects/qtrans0/files/kf5/0.3.3/qtrans-0.3.3.tar.gz" +MD5SUM="db762cd3b90de9242ffd10384b9dea2f" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Roland Suchan" +EMAIL="snrd@arcor.de" diff --git a/office/qtrans/slack-desc b/office/qtrans/slack-desc new file mode 100644 index 0000000000..0d641c072d --- /dev/null +++ b/office/qtrans/slack-desc @@ -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------------------------------------------------------| +qtrans: qtrans (offline word translator) +qtrans: +qtrans: qtrans is a offline translator for Qt5/KF5 +qtrans: +qtrans: Home Page: http://sourceforge.net/projects/qtrans0 +qtrans: +qtrans: +qtrans: +qtrans: +qtrans: +qtrans: -- cgit v1.2.3-80-g2a13