diff options
author | Steven Voges <svoges.sbo@gmail.com> | 2023-09-02 07:02:48 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-09-02 07:02:48 +0700 |
commit | a73759652834d445fad236eeec268804235d2751 (patch) | |
tree | 1733e23dbac26d598bb3d349d77508f31d0df464 /libraries/miniupnpc/miniupnpc.SlackBuild | |
parent | cdc844d758ffa2070beb79449ceba4bc25007ec7 (diff) |
libraries/miniupnpc: Updated for version 2.2.5.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/miniupnpc/miniupnpc.SlackBuild')
-rw-r--r-- | libraries/miniupnpc/miniupnpc.SlackBuild | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/libraries/miniupnpc/miniupnpc.SlackBuild b/libraries/miniupnpc/miniupnpc.SlackBuild index 962d2783511ef..63c3f371e5ddf 100644 --- a/libraries/miniupnpc/miniupnpc.SlackBuild +++ b/libraries/miniupnpc/miniupnpc.SlackBuild @@ -2,6 +2,7 @@ # Slackware build script for miniupnpc +# Copyright 2023 Steven Voges <Oregon, USA> # Copyright 2012-2018 Larry Hajali <larryhaja[at]gmail[dot]com> # All rights reserved. # @@ -25,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=miniupnpc -VERSION=${VERSION:-2.2.3} +VERSION=${VERSION:-2.2.5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -38,9 +39,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 @@ -81,46 +79,42 @@ find -L . \ # Slackware specific info. patch -p1 < $CWD/slackware-version.patch -sed -i "s|lib${PRGNAM}\.a|lib${PRGNAM}\.so|" setup.py - -# Use already built shared object for Python module -# Unversioned link is not enough to avoid a rebuild -sed -i -e 's|build/libminiupnpc.a|build/libminiupnpc.so.%{version}|g' setup.py - -patch -p1 < $CWD/miniupnpc-cmake.patch mkdir -p build cd build cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_DOCDIR=doc \ + -DCMAKE_INSTALL_INFODIR=info \ + -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \ + -DCMAKE_INSTALL_MANDIR=man \ -DNO_GETADDRINFO=FALSE \ -DUPNPC_BUILD_SAMPLE=TRUE \ -DUPNPC_BUILD_SHARED=TRUE \ -DUPNPC_BUILD_STATIC=FALSE \ -DUPNPC_BUILD_TESTS=TRUE \ - -DUPNPC_NO_INSTALL=FALSE .. + -DUPNPC_NO_INSTALL=FALSE \ + -DCMAKE_BUILD_TYPE=Release .. make make install DESTDIR=$PKG cd .. CFLAGS="$SLKCFLAGS" \ -python setup.py install --root=$PKG - -CFLAGS="$SLKCFLAGS" \ python3 setup.py build python3 setup.py install --root=$PKG +chmod 755 $PKG/usr/bin/external-ip.sh + 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 -mkdir -p $PKG/usr/man/man3 -gzip -c9 man3/miniupnpc.3 > $PKG/usr/man/man3/miniupnpc.3.gz +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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a Changelog.txt LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION +cp -a Changelog.txt LICENSE README VERSION \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |