From 0f92c709e8a608b6e8717fcc2423d2cc23aab120 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 4 Nov 2018 13:20:29 +0000 Subject: shellinabox: update to 2.20 --- shellinabox/build/shellinabox.SlackBuild | 43 ++++++++++++++------------------ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/shellinabox/build/shellinabox.SlackBuild b/shellinabox/build/shellinabox.SlackBuild index 4ec8efe0..c283bd1e 100755 --- a/shellinabox/build/shellinabox.SlackBuild +++ b/shellinabox/build/shellinabox.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright 2013 Eric Hameleers, Eindhoven, NL +# Copyright 2013, 2018 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -27,11 +27,13 @@ # By: Eric Hameleers # For: shellinabox # Descr: Web based AJAX terminal emulator -# URL: http://code.google.com/p/shellinabox/ +# URL: https://github.com/shellinabox/shellinabox # Needs: # Changelog: -# 2.14-1: 01/Jun/2013 by Eric Hameleers +# 2.14-1: 01/jun/2013 by Eric Hameleers # * Initial build. +# 2.20-1: 04/nov/2018 by Eric Hameleers +# * Update. # # Run 'sh shellinabox.SlackBuild' to build a Slackware package. # The package (.tgz) and .txt file as well as build logs are created in /tmp . @@ -40,9 +42,9 @@ # ----------------------------------------------------------------------------- PRGNAM=shellinabox -VERSION=${VERSION:-2.14} +VERSION=${VERSION:-2.20} BUILD=${BUILD:-1} -NUMJOBS=${NUMJOBS:" -j4 "} +NUMJOBS=${NUMJOBS:" -j$(nproc) "} TAG=${TAG:-alien} DOCS="AUTHORS COPYING ChangeLog GPL-2 INSTALL* NEWS README* TODO" @@ -56,28 +58,25 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz" -SRCURL="http://shellinabox.googlecode.com/files/${PRGNAM}-${VERSION}.tar.gz" +SRCURL="https://github.com/${PRGNAM}/${PRGNAM}/archive/v${VERSION}.tar.gz" ## ## --- with a little luck, you won't have to edit below this point --- ## ## # Automatically determine the architecture we're building on: -MARCH=$( uname -m ) if [ -z "$ARCH" ]; then - case "$MARCH" in - i?86) export ARCH=i486 ;; - armv7hl) export ARCH=$MARCH ;; - armv6hl) export ARCH=$MARCH ;; - armv5hl) export ARCH=$MARCH ;; - arm*) export ARCH=arm ;; + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$MARCH ;; + *) ARCH=$(uname -m) ;; esac + export ARCH fi case "$ARCH" in - i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" + i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; x86_64) SLKCFLAGS="-O2 -fPIC" @@ -86,12 +85,6 @@ case "$ARCH" in armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; - armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; - armv5hl) SLKCFLAGS="-O2 -mthumb -march=armv5te -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfp" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; *) SLKCFLAGS=${SLKCFLAGS:-"O2"} SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""} ;; @@ -130,7 +123,7 @@ if ! [ -f ${SOURCE} ]; then if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi if ! [ "x${SRCURL}" == "x" ]; then echo "Will download file to $(dirname $SOURCE)" - wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true + wget -nv -T 20 --content-disposition -O "${SOURCE}" "${SRCURL}" || true if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then echo "Downloading '$(basename ${SOURCE})' failed... aborting the build." mv -f "${SOURCE}" "${SOURCE}".FAIL @@ -161,6 +154,8 @@ chown -R root:root . chmod -R u+w,go+r-w,a+X-s . echo Building ... +[ ! -x configure ] && autoreconf -vif + LDFLAGS="$SLKLDFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ CFLAGS="$SLKCFLAGS" \ @@ -178,7 +173,7 @@ CFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log -make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log +make $NUMJOBS || make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log make DESTDIR=$PKG install 2>&1 | tee $OUTPUT/install-${PRGNAM}.log # Install the rc script and its configuration: @@ -224,7 +219,7 @@ config etc/rc.d/rc.shellinabox.new config etc/sysconfig/shellinabox.new # -# Update rc.local so that Icecast will be started on boot +# Update rc.local so that shellinabox will be started on boot # if ! grep "rc.shellinabox" etc/rc.d/rc.local 1>/dev/null 2>&1 ; then cat <<_EOM_ >> etc/rc.d/rc.local -- cgit v1.2.3-65-gdbad