From 4b5157d7a0b3453665a8a1005eb17db8513d98a5 Mon Sep 17 00:00:00 2001 From: Dan Theisen Date: Wed, 6 Oct 2021 13:35:01 +0000 Subject: user/miniupnpc: new package --- user/miniupnpc/APKBUILD | 41 ++++++++++++++++++++++++++ user/miniupnpc/fix-cmake-include-install.patch | 29 ++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 user/miniupnpc/APKBUILD create mode 100644 user/miniupnpc/fix-cmake-include-install.patch diff --git a/user/miniupnpc/APKBUILD b/user/miniupnpc/APKBUILD new file mode 100644 index 000000000..c1445066a --- /dev/null +++ b/user/miniupnpc/APKBUILD @@ -0,0 +1,41 @@ +# Contributor: Dan Theisen +# Maintainer: Dan Theisen +pkgname=miniupnpc +pkgver=2.2.3 +pkgrel=0 +pkgdesc="A lightweight UPNP client enabling applications to control UPnP gateways" +url="https://miniupnp.tuxfamily.org/" +arch="all" +options="!check" # no tests +license="BSD-3-Clause" +depends="" +makedepends="cmake" +subpackages="$pkgname-dev $pkgname-doc" +source="http://miniupnp.tuxfamily.org/files/miniupnpc-$pkgver.tar.gz + fix-cmake-include-install.patch + " + +build() { + if [ "$CBUILD" != "$CHOST" ]; then + CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" + fi + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=True \ + -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + ${CMAKE_CROSSOPTS} \ + . + make +} + +package() { + make DESTDIR="$pkgdir" install + install -m644 -Dt "$pkgdir"/usr/share/man/man3 man3/miniupnpc.3 +} + + +sha512sums="8b9555d336d5dfe8017a16727f964cddacb3f2bf3528fe3dd2416480da5763b24e1740345e470f2123c170d79d88444e41dbbce4536e6069590925e4805bc5ee miniupnpc-2.2.3.tar.gz +426fb6a67f6114e49eef59d7e87a68a749341707eca58699fbe530a49e08c66435e9bd05d8e4ddd30ad1d48d193203cd16f34754bfbe0ac3f68c28f130e41b3d fix-cmake-include-install.patch" diff --git a/user/miniupnpc/fix-cmake-include-install.patch b/user/miniupnpc/fix-cmake-include-install.patch new file mode 100644 index 000000000..0ed4455b1 --- /dev/null +++ b/user/miniupnpc/fix-cmake-include-install.patch @@ -0,0 +1,29 @@ +--- a/CMakeLists.txt 2021-10-06 13:27:48.242245444 +0000 ++++ b/CMakeLists.txt 2021-10-06 13:28:05.140476639 +0000 +@@ -221,16 +221,16 @@ + + if (NOT UPNPC_NO_INSTALL) + install (FILES +- miniupnpc.h +- miniwget.h +- upnpcommands.h +- igd_desc_parse.h +- upnpreplyparse.h +- upnperrors.h +- upnpdev.h +- miniupnpctypes.h +- portlistingparse.h +- miniupnpc_declspec.h ++ include/miniupnpc.h ++ include/miniwget.h ++ include/upnpcommands.h ++ include/igd_desc_parse.h ++ include/upnpreplyparse.h ++ include/upnperrors.h ++ include/upnpdev.h ++ include/miniupnpctypes.h ++ include/portlistingparse.h ++ include/miniupnpc_declspec.h + DESTINATION include/miniupnpc + ) + -- cgit v1.2.3-70-g09d2