diff options
Diffstat (limited to 'office/texworks/texworks.SlackBuild')
-rw-r--r-- | office/texworks/texworks.SlackBuild | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/office/texworks/texworks.SlackBuild b/office/texworks/texworks.SlackBuild index d62286ebfb..b33ee321f6 100644 --- a/office/texworks/texworks.SlackBuild +++ b/office/texworks/texworks.SlackBuild @@ -1,10 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for TeXworks -# Written by digwtx (wtx358@qq.com) -# Updated by Willy Sudiarto Raharjo -# Copyright 2016 - 2019 Johannes Schoepfer, Germany +# Written by digwtx +# Copyright 2016-2024 Johannes Schoepfer, Germany # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,10 +23,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=texworks -VERSION=${VERSION:-0.6.3} +VERSION=${VERSION:-0.6.9} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -37,7 +39,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +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} @@ -67,38 +73,35 @@ cd $PRGNAM-release-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} + -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} + -( mkdir build - cd build - #-DWITH_LUA='ON' \ +mkdir build +cd build cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DTeXworks_PLUGIN_DIR="/usr/lib$LIBDIRSUFFIX/texworks" \ - -DTW_BUILD_ID='slackbuilds.org' \ - -DWITH_PYTHON='ON' \ - -DDESIRED_QT_VERSION:STRING=4 \ - -DBUILD_SHARED_LIBS=ON \ - -DCMAKE_BUILD_TYPE=Release .. + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DTeXworks_PLUGIN_DIR="/usr/lib$LIBDIRSUFFIX/texworks" \ + -DTW_BUILD_ID='slackbuilds.org' \ + -DWITH_PYTHON='Off' \ + -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \ + -DBUILD_SHARED_LIBS='ON' \ + -DCMAKE_BUILD_TYPE=Release \ + .. make make install DESTDIR=$PKG -) +cd .. -#-DMAN_INSTALL_DIR=/usr/man doesn't work here mkdir -p $PKG/usr/man/man1 cat $PKG/usr/share/man/man1/texworks.1 | gzip > $PKG/usr/man/man1/texworks.1.gz rm -rf $PKG/usr/share/man -( mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION - cd $PKG/usr/share/doc/texworks - mv COPYING NEWS README.md $PKG/usr/doc/$PRGNAM-$VERSION -) +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp $PKG/usr/share/doc/texworks/{COPYING,NEWS,README.md} \ + $PKG/usr/doc/$PRGNAM-$VERSION rm -rf $PKG/usr/share/doc - cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild find $PKG | xargs file | grep -e "executable" -e "shared object" \ @@ -109,4 +112,4 @@ 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} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |