diff options
Diffstat (limited to 'office/texmacs/texmacs.SlackBuild')
-rw-r--r-- | office/texmacs/texmacs.SlackBuild | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/office/texmacs/texmacs.SlackBuild b/office/texmacs/texmacs.SlackBuild index 81e42ac3bc..639297e8b3 100644 --- a/office/texmacs/texmacs.SlackBuild +++ b/office/texmacs/texmacs.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for Texmacs -# Copyright 2013-2018 Zhu Qun-Ying +# Copyright 2013-2022 Zhu Qun-Ying # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,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=texmacs -VERSION=${VERSION:-1.99.11} +VERSION=${VERSION:-2.1.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} SRCNAM=TeXmacs @@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +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} @@ -61,9 +71,10 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $SRCNAM-$VERSION-src -tar xvf $CWD/$SRCNAM-$VERSION-src.tar.gz -cd $SRCNAM-$VERSION-src +rm -rf $PRGNAM-$VERSION +mkdir $PRGNAM-$VERSION +tar -xvf $CWD/$SRCNAM-$VERSION-src.tar.gz --strip-components=1 -C $PRGNAM-$VERSION +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -96,7 +107,6 @@ CXX="g++" \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux sed -i -e "s|-lfreetype|-lfreetype -lz|" src/makefile @@ -116,4 +126,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 |