Import miniupnpc-1.6.

miniupnpc, the MiniUPnP client library, enables applications to access
the services provided by an UPnP "Internet Gateway Device" present on
the network. In UPnP terminology, it is a UPnP Control Point.

ok sthen@
This commit is contained in:
ajacoutot 2012-01-13 09:23:09 +00:00
parent c857b25352
commit 4712c03841
9 changed files with 135 additions and 0 deletions

50
net/miniupnp/miniupnpc/Makefile Executable file
View File

@ -0,0 +1,50 @@
# $OpenBSD: Makefile,v 1.1.1.1 2012/01/13 09:23:09 ajacoutot Exp $
COMMENT-main= UPnP IGD client lightweight library
COMMENT-python= python module for miniupnpc
MODPY_EGG_VERSION= 1.6
DISTNAME= miniupnpc-${MODPY_EGG_VERSION}
PKGNAME-main= ${DISTNAME}
PKGNAME-python= py-${DISTNAME}
SHARED_LIBS += miniupnpc 0.0
WANTLIB-main += c
LIB_DEPENDS-python=${MODPY_LIB_DEPENDS}
WANTLIB-python += ${MODPY_WANTLIB}
MASTER_SITES= ${HOMEPAGE}files/
MULTI_PACKAGES= -main -python
MODULES= lang/python
USE_GMAKE= Yes
MAKE_ENV= APIVERSION=${LIBminiupnpc_VERSION} \
INSTALLPREFIX=${DESTDIR}${PREFIX}
# Override variables from the python module.
CONFIGURE_STYLE= simple
CONFIGURE_SCRIPT= updateminiupnpcstrings.sh
CATEGORIES-main= net
RUN_DEPENDS-main= # empty
pre-configure:
${SUBST_CMD} ${WRKSRC}/Makefile
post-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${MAKE_PROGRAM} ${MAKE_FLAGS} pythonmodule
post-install:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${MAKE_PROGRAM} ${MAKE_FLAGS} installpythonmodule
${INSTALL_MAN_DIR} ${PREFIX}/man/man3
${INSTALL_MAN} ${WRKSRC}/man3/miniupnpc.3 \
${PREFIX}/man/man3/miniupnpc.3
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (miniupnpc-1.6.tar.gz) = iAVfLUoGHP1M/iWp6uIvZw==
RMD160 (miniupnpc-1.6.tar.gz) = 2Gt1szGj+1UlxxcIVI8xGXfAWY8=
SHA1 (miniupnpc-1.6.tar.gz) = 748u2xfy58W43GfugKZcGZ2CPgo=
SHA256 (miniupnpc-1.6.tar.gz) = u9a3VuavRLWlsPm5Pq2j+4ki7R1kUbfW8YTQrgyBOZQ=
SIZE (miniupnpc-1.6.tar.gz) = 66454

View File

@ -0,0 +1,34 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2012/01/13 09:23:09 ajacoutot Exp $
--- Makefile.orig Tue Jun 21 17:24:14 2011
+++ Makefile Sat Jan 7 10:00:43 2012
@@ -23,7 +23,7 @@ JNAERATOR = jnaerator-0.9.3.jar
#LDLIBS=-lsocket -lnsl -lresolv
# APIVERSION is used to build SONAME
-APIVERSION = 8
+APIVERSION ?= 8
SRCS = igd_desc_parse.c miniupnpc.c minixml.c minisoap.c miniwget.c \
upnpc.c upnpcommands.c upnpreplyparse.c testminixml.c \
@@ -103,11 +103,11 @@ check: validateminixml validateminiwget
everything: all $(EXECUTABLES_ADDTESTS)
pythonmodule: $(LIBRARY) miniupnpcmodule.c setup.py
- python setup.py build
+ ${MODPY_BIN} setup.py build
touch $@
installpythonmodule: pythonmodule
- python setup.py install
+ ${MODPY_BIN} setup.py install --prefix=$(PREFIX)
validateminixml: minixmlvalid
@echo "minixml validation test"
@@ -133,7 +133,6 @@ install: $(FILESTOINSTALL)
$(INSTALL) -m 644 $(LIBRARY) $(INSTALLDIRLIB)
ifneq ($(OS), AmigaOS)
$(INSTALL) -m 644 $(SHAREDLIBRARY) $(INSTALLDIRLIB)/$(SONAME)
- ln -fs $(SONAME) $(INSTALLDIRLIB)/$(SHAREDLIBRARY)
endif
$(INSTALL) -d $(INSTALLDIRBIN)
ifeq ($(OS), AmigaOS)

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-miniwget_c,v 1.1.1.1 2012/01/13 09:23:09 ajacoutot Exp $
--- miniwget.c.orig Sat Jan 7 10:01:18 2012
+++ miniwget.c Sat Jan 7 10:01:28 2012
@@ -33,6 +33,7 @@
#include <sys/select.h>
#endif /* #else defined(__amigaos__) && !defined(__amigaos4__) */
#include <sys/socket.h>
+#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#define closesocket close

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-setup_py,v 1.1.1.1 2012/01/13 09:23:09 ajacoutot Exp $
--- setup.py.orig Sat Jan 7 10:58:45 2012
+++ setup.py Sat Jan 7 10:58:49 2012
@@ -7,7 +7,7 @@
#
# replace libminiupnpc.a by libminiupnpc.so for shared library usage
from distutils.core import setup, Extension
-setup(name="miniupnpc", version="1.5",
+setup(name="miniupnpc", version="1.6",
ext_modules=[
Extension(name="miniupnpc", sources=["miniupnpcmodule.c"],
extra_objects=["libminiupnpc.a"])

View File

@ -0,0 +1,3 @@
miniupnpc, the MiniUPnP client library, enables applications to access
the services provided by an UPnP "Internet Gateway Device" present on
the network. In UPnP terminology, it is a UPnP Control Point.

View File

@ -0,0 +1 @@
Python module for miniupnpc.

View File

@ -0,0 +1,16 @@
@comment $OpenBSD: PLIST-main,v 1.1.1.1 2012/01/13 09:23:09 ajacoutot Exp $
bin/external-ip
@bin bin/upnpc
include/miniupnpc/
include/miniupnpc/declspec.h
include/miniupnpc/igd_desc_parse.h
include/miniupnpc/miniupnpc.h
include/miniupnpc/miniupnpctypes.h
include/miniupnpc/miniwget.h
include/miniupnpc/portlistingparse.h
include/miniupnpc/upnpcommands.h
include/miniupnpc/upnperrors.h
include/miniupnpc/upnpreplyparse.h
lib/libminiupnpc.a
@lib lib/libminiupnpc.so.${LIBminiupnpc_VERSION}
@man man/man3/miniupnpc.3

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PLIST-python,v 1.1.1.1 2012/01/13 09:23:09 ajacoutot Exp $
lib/python${MODPY_VERSION}/site-packages/miniupnpc-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
lib/python${MODPY_VERSION}/site-packages/miniupnpc.so