diff --git a/net/miniupnp/miniupnpc/Makefile b/net/miniupnp/miniupnpc/Makefile new file mode 100755 index 00000000000..8ce5f03a707 --- /dev/null +++ b/net/miniupnp/miniupnpc/Makefile @@ -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 diff --git a/net/miniupnp/miniupnpc/distinfo b/net/miniupnp/miniupnpc/distinfo new file mode 100644 index 00000000000..2d0a249240a --- /dev/null +++ b/net/miniupnp/miniupnpc/distinfo @@ -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 diff --git a/net/miniupnp/miniupnpc/patches/patch-Makefile b/net/miniupnp/miniupnpc/patches/patch-Makefile new file mode 100644 index 00000000000..45c3fdcb5e5 --- /dev/null +++ b/net/miniupnp/miniupnpc/patches/patch-Makefile @@ -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) diff --git a/net/miniupnp/miniupnpc/patches/patch-miniwget_c b/net/miniupnp/miniupnpc/patches/patch-miniwget_c new file mode 100644 index 00000000000..457acb0ac11 --- /dev/null +++ b/net/miniupnp/miniupnpc/patches/patch-miniwget_c @@ -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 + #endif /* #else defined(__amigaos__) && !defined(__amigaos4__) */ + #include ++#include + #include + #include + #define closesocket close diff --git a/net/miniupnp/miniupnpc/patches/patch-setup_py b/net/miniupnp/miniupnpc/patches/patch-setup_py new file mode 100644 index 00000000000..e5ea33cf3d2 --- /dev/null +++ b/net/miniupnp/miniupnpc/patches/patch-setup_py @@ -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"]) diff --git a/net/miniupnp/miniupnpc/pkg/DESCR-main b/net/miniupnp/miniupnpc/pkg/DESCR-main new file mode 100644 index 00000000000..e891efed61f --- /dev/null +++ b/net/miniupnp/miniupnpc/pkg/DESCR-main @@ -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. diff --git a/net/miniupnp/miniupnpc/pkg/DESCR-python b/net/miniupnp/miniupnpc/pkg/DESCR-python new file mode 100644 index 00000000000..8f5dadf0ccd --- /dev/null +++ b/net/miniupnp/miniupnpc/pkg/DESCR-python @@ -0,0 +1 @@ +Python module for miniupnpc. diff --git a/net/miniupnp/miniupnpc/pkg/PLIST-main b/net/miniupnp/miniupnpc/pkg/PLIST-main new file mode 100644 index 00000000000..d3976f49934 --- /dev/null +++ b/net/miniupnp/miniupnpc/pkg/PLIST-main @@ -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 diff --git a/net/miniupnp/miniupnpc/pkg/PLIST-python b/net/miniupnp/miniupnpc/pkg/PLIST-python new file mode 100644 index 00000000000..796ebd1429d --- /dev/null +++ b/net/miniupnp/miniupnpc/pkg/PLIST-python @@ -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