diff options
Diffstat (limited to 'source/ap/texinfo/texinfo.SlackBuild')
-rwxr-xr-x | source/ap/texinfo/texinfo.SlackBuild | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/source/ap/texinfo/texinfo.SlackBuild b/source/ap/texinfo/texinfo.SlackBuild index 5ac71428..990649cd 100755 --- a/source/ap/texinfo/texinfo.SlackBuild +++ b/source/ap/texinfo/texinfo.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2008, 2009, 2010, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2008, 2009, 2010, 2016, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,10 +20,11 @@ # 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) PKGNAM=texinfo VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-3} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -35,6 +36,14 @@ if [ -z "$ARCH" ]; then esac fi +# 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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + NUMJOBS=${NUMJOBS:-" -j7 "} if [ "$ARCH" = "i586" ]; then @@ -57,7 +66,6 @@ else LIBDIRSUFFIX="" fi -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-texinfo @@ -66,7 +74,7 @@ mkdir -p $TMP $PKG cd $TMP tar xvf $CWD/texinfo-$VERSION.tar.xz || exit 1 -cd texinfo-$VERSION +cd texinfo-$VERSION || exit 1 find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ -exec chmod 755 {} \; -o \ @@ -85,7 +93,7 @@ CFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux || exit 1 make $NUMJOBS || make || exit 1 -make install DESTDIR=$PKG +make install DESTDIR=$PKG || exit 1 # Be sure this is "fresh" zcat $CWD/dir.gz > $PKG/usr/info/dir |