summaryrefslogtreecommitdiffstats
path: root/network/uget/uget.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/uget/uget.SlackBuild')
-rw-r--r--network/uget/uget.SlackBuild36
1 files changed, 27 insertions, 9 deletions
diff --git a/network/uget/uget.SlackBuild b/network/uget/uget.SlackBuild
index b5d46070bf..faf76f9149 100644
--- a/network/uget/uget.SlackBuild
+++ b/network/uget/uget.SlackBuild
@@ -1,11 +1,13 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for uget
# Originally written by Morten Juhl-Johansen Zölde-Fejér <email removed>
-# Updated and now maintained by B. Watson <yalhcru@gmail.com>
+# Updated and now maintained by B. Watson <urchlay@slackware.uk>
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20210926 bkw: BUILD=2, fix build on -current/15.0
+# 20200223 bkw: update for 2.2.3_1
# 20191130 bkw: update for 2.2.2
# 20180612 bkw: update for 2.2.1
@@ -34,10 +36,20 @@
# - install developer docs doc/*.txt
# - don't install empty AUTHORS and ChangeLog
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=uget
-VERSION=${VERSION:-2.2.2}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.2.3_1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+# Tarball filename version number doesn't match top-level dir inside
+# tarball, and neither matches VERSION 'cause we can't use hyphens.
+# This stuff can safely be left in place: if VERSION contains no _
+# character, TARVER == DIRVER == VERSION.
+TARVER=${VERSION/_/-}
+DIRVER="$( echo $VERSION | cut -d_ -f1 )"
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -47,7 +59,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+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}
@@ -71,9 +87,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$DIRVER
+tar xvf $CWD/$PRGNAM-$TARVER.tar.gz
+cd $PRGNAM-$DIRVER
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
@@ -84,6 +100,8 @@ GSTREAMER="${GSTREAMER:-yes}"
[ "$LIBNOTIFY" = "no" ] && NOTIFYFLAG="--disable-notify"
[ "$GSTREAMER" = "no" ] && GSTFLAG="--disable-gstreamer"
+SLKCFLAGS+=" -fcommon"
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -107,4 +125,4 @@ sed -e "s,@A,$GSTREAMER," \
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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