summaryrefslogtreecommitdiffstats
path: root/network/wput/wput.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/wput/wput.SlackBuild')
-rw-r--r--network/wput/wput.SlackBuild95
1 files changed, 53 insertions, 42 deletions
diff --git a/network/wput/wput.SlackBuild b/network/wput/wput.SlackBuild
index 3270a0344a..c930ea0488 100644
--- a/network/wput/wput.SlackBuild
+++ b/network/wput/wput.SlackBuild
@@ -2,27 +2,18 @@
# Slackware build script for wput
-# Originally written by Chris Abela <chris.abela@maltats.com> May 2009
-
-# Copyright 2014 Ryan P.C. McQuen, WA, ryanpcmcquen@member.fsf.org
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Originally written by Chris Abela <email removed>.
+# Formerly maintained by Ryan P.C. McQuen.
+# Now maintained by B. Watson <urchlay@slackware.uk>.
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20210926 bkw:
+# - update for v0.6.2+git20130413_11, for parity with Debian.
+# - install /etc/wputrc.new (also add doinst.sh).
+# - relicense as WTFPL with permission from Ryan P.C. McQuen (he's the one
+# who added the license; the original author didn't include one).
+# - add mention of ~/.netrc to the man page and our README.
# 20180103 bkw: update for v0.6.2. Which is from 9+ years ago...
@@ -34,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=wput
-VERSION=${VERSION:-0.6.2}
+VERSION=${VERSION:-0.6.2+git20130413_11}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -47,9 +38,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -75,43 +63,66 @@ fi
set -e
+TARVER=${VERSION%_*}
+DEBVER=${VERSION#*_}
+
rm -rf $PKG
-mkdir -p $TMP $OUTPUT $PKG/usr/bin $PKG/usr/man/man1
+mkdir -p $TMP $OUTPUT $PKG
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tgz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$TARVER
+tar xvf $CWD/${PRGNAM}_${TARVER}.orig.tar.bz2
+cd $PRGNAM-$TARVER
+tar xvf $CWD/${PRGNAM}_${TARVER}-${DEBVER}.debian.tar.xz
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# Apply all of Debian's patches. These include security fixes, compile
+# fixes, typo/spelling fixes, etc.
+for i in $( cat debian/patches/series ); do
+ patch -p1 < debian/patches/$i
+done
+
+# Further typo/grammar/spelling fixes for man pages. Also mention
+# netrc(5) in wput.1, since it's not obvious.
+patch -p1 < $CWD/manpages.diff
+
+sed -i "s,@VERSION@,$VERSION," doc/*.1
+
+# Note to self: on 64-bit, we can ignore this warning from configure:
+# checking Large File System support: no
+# What it really means is that, on 64-bit, we don't need any extra
+# CFLAGS to enable large file (64-bit off_t) support. On 32-bit,
+# we get "yes", and the appropriate flags are used automatically.
+# If this were to fail on 32-bit, wput wouldn't be able to handle
+# files >= 2GB. Quite possibly, nobody would ever notice...
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=$PKG/usr \
+ --prefix=/usr \
+ --mandir=/usr/man \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--build=$ARCH-slackware-linux \
--host=$ARCH-slackware-linux
-# Maximum compression for the man file:
-sed -i 's/gzip/gzip -9/' doc/Makefile
-# Unable to set --datadir for configure script:
-sed -i 's/^datadir *= $(prefix)\/share/datadir = $(prefix)/' Makefile
-
make
-make install
+make install DESTDIR=$PKG
strip $PKG/usr/bin/$PRGNAM
+# The shipped wputrc has everything commented out, so there's no reason
+# not to install it in /etc (used to be in the doc dir).
+mkdir -p $PKG/etc
+cp -a doc/wputrc $PKG/etc/wputrc.new
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a ABOUT-NLS C* TODO doc/USAGE.* doc/passwordfile doc/wputrc \
+cp -a ABOUT-NLS C* TODO doc/USAGE.* doc/passwordfile \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
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