summaryrefslogtreecommitdiffstats
path: root/libraries/miniupnpc/miniupnpc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/miniupnpc/miniupnpc.SlackBuild')
-rw-r--r--libraries/miniupnpc/miniupnpc.SlackBuild34
1 files changed, 14 insertions, 20 deletions
diff --git a/libraries/miniupnpc/miniupnpc.SlackBuild b/libraries/miniupnpc/miniupnpc.SlackBuild
index 962d278351..63c3f371e5 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