summaryrefslogtreecommitdiff
path: root/repo/miniupnpc
diff options
context:
space:
mode:
Diffstat (limited to 'repo/miniupnpc')
-rw-r--r--repo/miniupnpc/fix-makefile-install.patch33
-rw-r--r--repo/miniupnpc/miniupnpc.xibuild31
2 files changed, 64 insertions, 0 deletions
diff --git a/repo/miniupnpc/fix-makefile-install.patch b/repo/miniupnpc/fix-makefile-install.patch
new file mode 100644
index 0000000..462fb7b
--- /dev/null
+++ b/repo/miniupnpc/fix-makefile-install.patch
@@ -0,0 +1,33 @@
+diff --git a/Makefile b/Makefile
+index a150374..1a96e52 100644
+--- a/Makefile
++++ b/Makefile
+@@ -162,7 +162,7 @@ PKGCONFIGDIR = $(INSTALLDIRLIB)/pkgconfig
+
+ FILESTOINSTALL = $(LIBRARY) $(EXECUTABLES)
+ ifeq (, $(findstring amiga, $(OS)))
+-FILESTOINSTALL += $(SHAREDLIBRARY) miniupnpc.pc
++FILESTOINSTALL += $(SHAREDLIBRARY) $(BUILD)/miniupnpc.pc
+ endif
+
+
+@@ -251,15 +251,15 @@ install: updateversion $(FILESTOINSTALL)
+ $(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(INSTALLDIRLIB)
+ ifeq (, $(findstring amiga, $(OS)))
+ $(INSTALL) -m 644 $(SHAREDLIBRARY) $(DESTDIR)$(INSTALLDIRLIB)/$(SONAME)
+- ln -fs $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(SHAREDLIBRARY)
++ ln -fs $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(notdir $(SHAREDLIBRARY))
+ $(INSTALL) -d $(DESTDIR)$(PKGCONFIGDIR)
+- $(INSTALL) -m 644 miniupnpc.pc $(DESTDIR)$(PKGCONFIGDIR)
++ $(INSTALL) -m 644 $(BUILD)/miniupnpc.pc $(DESTDIR)$(PKGCONFIGDIR)
+ endif
+ $(INSTALL) -d $(DESTDIR)$(INSTALLDIRBIN)
+ ifneq (, $(findstring amiga, $(OS)))
+- $(INSTALL) -m 755 upnpc-static $(DESTDIR)$(INSTALLDIRBIN)/upnpc
++ $(INSTALL) -m 755 $(BUILD)/upnpc-static $(DESTDIR)$(INSTALLDIRBIN)/upnpc
+ else
+- $(INSTALL) -m 755 upnpc-shared $(DESTDIR)$(INSTALLDIRBIN)/upnpc
++ $(INSTALL) -m 755 $(BUILD)/upnpc-shared $(DESTDIR)$(INSTALLDIRBIN)/upnpc
+ endif
+ $(INSTALL) -m 755 external-ip.sh $(DESTDIR)$(INSTALLDIRBIN)/external-ip
+ ifeq (, $(findstring amiga, $(OS)))
diff --git a/repo/miniupnpc/miniupnpc.xibuild b/repo/miniupnpc/miniupnpc.xibuild
new file mode 100644
index 0000000..9ba4693
--- /dev/null
+++ b/repo/miniupnpc/miniupnpc.xibuild
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+NAME="miniupnpc"
+DESC="Library and tool to control NAT in UPnP-enabled routers"
+
+MAKEDEPS="python"
+
+PKG_VER=2.2.3
+SOURCE="http://miniupnp.free.fr/files/miniupnpc-$PKG_VER.tar.gz"
+
+ADDITIONAL="
+fix-makefile-install.patch
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ make
+ python3 setup.py build
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" PREFIX=/usr install
+}
+