diff options
Diffstat (limited to 'development/hugo/hugo.SlackBuild')
-rw-r--r-- | development/hugo/hugo.SlackBuild | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/development/hugo/hugo.SlackBuild b/development/hugo/hugo.SlackBuild index f9e32fb800..10d80c353a 100644 --- a/development/hugo/hugo.SlackBuild +++ b/development/hugo/hugo.SlackBuild @@ -1,7 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for hugo +# Copyright 2020-2024 Andrew Payne <phalange@komputermatrix.com> # Copyright 2018-2019 Donald Cooley South Haven, IN USA # All rights reserved. # @@ -22,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.55.6} +VERSION=${VERSION:-0.125.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,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." @@ -56,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 . \ @@ -65,12 +74,13 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -mkdir -p $PKG/usr/bin/ -cp hugo $PKG/usr/bin/hugo +mkdir -p $PKG/{usr/bin,opt/$PRGNAM} + cp -a * $PKG/opt/$PRGNAM + ln -s /opt/$PRGNAM/hugo $PKG/usr/bin/$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 @@ -78,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 |