summaryrefslogtreecommitdiffstats
path: root/network/wsdd2/wsdd2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/wsdd2/wsdd2.SlackBuild')
-rw-r--r--network/wsdd2/wsdd2.SlackBuild29
1 files changed, 21 insertions, 8 deletions
diff --git a/network/wsdd2/wsdd2.SlackBuild b/network/wsdd2/wsdd2.SlackBuild
index deff03a691..072cf3d55d 100644
--- a/network/wsdd2/wsdd2.SlackBuild
+++ b/network/wsdd2/wsdd2.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for wsdd2
-# Copyright 2020 Tim Dickson Scotland
+# Copyright 2020,2022 Tim Dickson Scotland
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,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=wsdd2
-VERSION=${VERSION:-1.8.3.2}
+VERSION=${VERSION:-1.8.7}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ 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}
@@ -71,12 +81,15 @@ find -L . \
#we are going to have to fix Makefile as we don't want systemd stuff
sed -i "/systemd/d" Makefile
-make CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS"
-make install DESTDIR=$PKG MANINSTALLDIR="usr/man" INSTALLPREFIX="usr"
+#patch the source to remove generally useless warning
+# ie. warning about missing (entirely optional) parameters in smb.conf
+patch wsdd2.c <${CWD}/wsdd2.patch
+#note: hopefully upstream will fix this. https://github.com/Netgear/wsdd2/issues/39
+make CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS"
+make install debug_W=-1 debug_L=-1 DESTDIR=$PKG MANDIR="/usr/man" INSTALLPREFIX="usr"
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
@@ -95,5 +108,5 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
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