summaryrefslogtreecommitdiffstats
path: root/development/hugo/hugo.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/hugo/hugo.SlackBuild')
-rw-r--r--development/hugo/hugo.SlackBuild28
1 files changed, 18 insertions, 10 deletions
diff --git a/development/hugo/hugo.SlackBuild b/development/hugo/hugo.SlackBuild
index 9d87a3f5a2..10d80c353a 100644
--- a/development/hugo/hugo.SlackBuild
+++ b/development/hugo/hugo.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for hugo
-# Copyright 2020-2021 Andrew Payne <phalange@komputermatrix.com>
+# Copyright 2020-2024 Andrew Payne <phalange@komputermatrix.com>
# Copyright 2018-2019 Donald Cooley South Haven, IN USA
# All rights reserved.
#
@@ -23,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=hugo
-VERSION=${VERSION:-0.80.0}
+VERSION=${VERSION:-0.125.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,14 +39,19 @@ 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}
-if [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; then
- BIT="32bit"
-elif [ "$ARCH" = "x86_64" ]; then
+if [ "$ARCH" = "x86_64" ]; then
BIT="64bit"
else
echo "$ARCH is not supported."
@@ -57,7 +65,7 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir -p $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM\_$VERSION\_Linux-$BIT.tar.gz -C $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM\_extended\_$VERSION\_Linux-$BIT.tar.gz -C $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -72,7 +80,7 @@ mkdir -p $PKG/{usr/bin,opt/$PRGNAM}
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- README.md LICENSE \
+ LICENSE README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -80,4 +88,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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