diff options
Diffstat (limited to '')
-rwxr-xr-x | source/l/ncurses/aaa_terminfo.SlackBuild (renamed from source/a/aaa_terminfo/aaa_terminfo.SlackBuild) | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/source/a/aaa_terminfo/aaa_terminfo.SlackBuild b/source/l/ncurses/aaa_terminfo.SlackBuild index c749893fe..aab8dc5db 100755 --- a/source/a/aaa_terminfo/aaa_terminfo.SlackBuild +++ b/source/l/ncurses/aaa_terminfo.SlackBuild @@ -1,5 +1,5 @@ -#!/bin/sh -# Copyright 2006, 2007, 2009, 2010, 2011, 2015 Patrick J. Volkerding, Sebeka, MN, USA +#!/bin/bash +# Copyright 2006, 2007, 2009, 2010, 2011, 2015, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -19,37 +19,56 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# If the ncurses package is not available, we might have to build it. +# Therefore, for use with make_world.sh, REQUIRE_GLOBAL_LOCK. + +cd $(dirname $0) ; CWD=$(pwd) PKGNAM=aaa_terminfo # Note the version of ncurses in use: -VERSION=${VERSION:-5.9} -BUILD=${BUILD:-1} +VERSION=${VERSION:-$(PRINT_PACKAGE_NAME=yes ./ncurses.SlackBuild | cut -f 2 -d -)} +BUILD=${BUILD:-4} +TMP=${TMP:-/tmp} +PKG=$TMP/package-${PKGNAM} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; 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 + if [ "$ARCH" = "x86_64" ]; then LIBDIRSUFFIX="64" else LIBDIRSUFFIX="" fi -CWD=$(pwd) -TMP=${TMP:-/tmp} -PKG=$TMP/package-${PKGNAM} +# If we don't have an ncurses package available in $TMP, we need to build it: +if ! /bin/ls $TMP/$(PRINT_PACKAGE_NAME=yes $CWD/ncurses.SlackBuild) 1> /dev/null 2> /dev/null ; then + TMP=$TMP $CWD/ncurses.SlackBuild +fi + rm -rf $PKG mkdir -p $TMP $PKG -# Best do this on a machine with the terminfo -# updated already. ;-) cd $PKG +mkdir cruft +cd cruft +explodepkg $TMP/$(PRINT_PACKAGE_NAME=yes $CWD/ncurses.SlackBuild) +sh install/doinst.sh +cd .. # I wonder if anything still looks here? mkdir -p usr/lib${LIBDIRSUFFIX} @@ -58,11 +77,11 @@ mkdir -p usr/lib${LIBDIRSUFFIX} ln -sf /usr/share/terminfo terminfo ) -# This has been the tradition starter collection since forever. +# This has been the traditional starter collection since forever. for dir in l n u v x ; do mkdir -p usr/share/terminfo/$dir ( cd usr/share/terminfo/$dir - cp -a /usr/share/terminfo/$dir/* . + cp -a $PKG/cruft/usr/share/terminfo/$dir/* . ) done @@ -75,9 +94,12 @@ done done ) +# Get rid of cruft: +rm -rf $PKG/cruft + mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/slack-desc.aaa_terminfo > $PKG/install/slack-desc -cd $TMP/package-${PKGNAM} +cd $PKG /sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz |