[miniupnpc] Initial import (#817311).

pcpa pcpa at fedoraproject.org
Fri Jun 1 23:53:19 UTC 2012


commit 2f7408ea3493affc8f351fe62a1a849b65a6dc3d
Author: pcpa <paulo.cesar.pereira.de.andrade at gmail.com>
Date:   Fri Jun 1 20:53:15 2012 -0400

    Initial import (#817311).

 .gitignore                  |    1 +
 miniupnpc-1.6-files.patch   |   20 +++++++
 miniupnpc-1.6-tests.patch   |   33 ++++++++++++
 miniupnpc-1.6-version.patch |   11 ++++
 miniupnpc.spec              |  120 +++++++++++++++++++++++++++++++++++++++++++
 sources                     |    1 +
 6 files changed, 186 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..514d241 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/miniupnpc-1.6.tar.gz
diff --git a/miniupnpc-1.6-files.patch b/miniupnpc-1.6-files.patch
new file mode 100644
index 0000000..9b68472
--- /dev/null
+++ b/miniupnpc-1.6-files.patch
@@ -0,0 +1,20 @@
+diff -up miniupnpc-1.6/CMakeLists.txt.orig miniupnpc-1.6/CMakeLists.txt
+--- miniupnpc-1.6/CMakeLists.txt.orig	2012-04-28 17:46:09.624307822 -0300
++++ miniupnpc-1.6/CMakeLists.txt	2012-04-28 17:47:06.342309999 -0300
+@@ -70,6 +70,7 @@ set (MINIUPNPC_SOURCES
+   minixml.c
+   minisoap.c
+   miniwget.c
++  receivedata.c
+   upnpc.c
+   upnpcommands.c
+   upnpreplyparse.c
+@@ -163,6 +164,8 @@ install (FILES
+   igd_desc_parse.h
+   upnpreplyparse.h
+   upnperrors.h
++  miniupnpctypes.h
++  portlistingparse.h
+   declspec.h
+   DESTINATION include/miniupnpc
+ )
diff --git a/miniupnpc-1.6-tests.patch b/miniupnpc-1.6-tests.patch
new file mode 100644
index 0000000..fc54a69
--- /dev/null
+++ b/miniupnpc-1.6-tests.patch
@@ -0,0 +1,33 @@
+diff -up miniupnpc-1.6/CMakeLists.txt.orig miniupnpc-1.6/CMakeLists.txt
+--- miniupnpc-1.6/CMakeLists.txt.orig	2012-05-02 20:58:02.285265348 -0300
++++ miniupnpc-1.6/CMakeLists.txt	2012-05-02 20:59:04.083267968 -0300
+@@ -127,25 +127,25 @@ if (UPNPC_BUILD_TESTS)
+   target_link_libraries (testminixml ${LDLIBS})
+ 
+   add_executable (minixmlvalid minixmlvalid.c minixml.c)
+-  target_link_libraries (minixmlvalid ${LDLIBS})
++  target_link_libraries (minixmlvalid ${LDLIBS} -L. -lminiupnpc)
+ 
+   add_executable (testupnpreplyparse testupnpreplyparse.c
+                                      minixml.c upnpreplyparse.c)
+-  target_link_libraries (testupnpreplyparse ${LDLIBS})
++  target_link_libraries (testupnpreplyparse ${LDLIBS} -L. -lminiupnpc)
+ 
+   add_executable (testigddescparse testigddescparse.c
+                                    igd_desc_parse.c minixml.c miniupnpc.c miniwget.c minissdpc.c
+                                    upnpcommands.c upnpreplyparse.c minisoap.c connecthostport.c
+                                    portlistingparse.c
+   )
+-  target_link_libraries (testigddescparse ${LDLIBS})
++  target_link_libraries (testigddescparse ${LDLIBS} -L. -lminiupnpc)
+ 
+   add_executable (testminiwget testminiwget.c
+                                miniwget.c miniupnpc.c minisoap.c upnpcommands.c minissdpc.c
+                                upnpreplyparse.c minixml.c igd_desc_parse.c connecthostport.c
+                                portlistingparse.c
+   )
+-  target_link_libraries (testminiwget ${LDLIBS})
++  target_link_libraries (testminiwget ${LDLIBS} -L. -lminiupnpc)
+ 
+ # set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} testminixml minixmlvalid testupnpreplyparse testigddescparse testminiwget)
+ endif (UPNPC_BUILD_TESTS)
diff --git a/miniupnpc-1.6-version.patch b/miniupnpc-1.6-version.patch
new file mode 100644
index 0000000..f4cce8e
--- /dev/null
+++ b/miniupnpc-1.6-version.patch
@@ -0,0 +1,11 @@
+diff -up miniupnpc-1.6/CMakeLists.txt.orig miniupnpc-1.6/CMakeLists.txt
+--- miniupnpc-1.6/CMakeLists.txt.orig	2012-04-28 17:53:32.752324825 -0300
++++ miniupnpc-1.6/CMakeLists.txt	2012-04-28 17:53:48.910325385 -0300
+@@ -116,7 +116,6 @@ endif (UPNPC_BUILD_STATIC)
+ if (UPNPC_BUILD_SHARED)
+   add_library (upnpc-shared SHARED ${MINIUPNPC_SOURCES})
+   set_target_properties (upnpc-shared PROPERTIES OUTPUT_NAME "miniupnpc")
+-  set_target_properties (upnpc-shared PROPERTIES VERSION ${MINIUPNPC_VERSION})
+   set_target_properties (upnpc-shared PROPERTIES SOVERSION ${MINIUPNPC_API_VERSION})
+   target_link_libraries (upnpc-shared ${LDLIBS})
+   set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} upnpc-shared)
diff --git a/miniupnpc.spec b/miniupnpc.spec
new file mode 100644
index 0000000..607f29e
--- /dev/null
+++ b/miniupnpc.spec
@@ -0,0 +1,120 @@
+%global major	8
+%filter_provides_in %{python_sitearch}/.*\.so$ 
+
+Summary:	Library and tool to control NAT in UPnP-enabled routers
+Name:		miniupnpc
+Version:	1.6
+Release:	6%{?dist}
+License:	BSD
+Group:		System Environment/Libraries
+URL:		http://miniupnp.free.fr/
+Source:		http://miniupnp.free.fr/files/%{name}-%{version}.tar.gz
+BuildRequires:	cmake
+BuildRequires:	python-devel
+# Install headers and add extra file to compilation
+# Patch originally from Mageia Linux
+Patch0:		%{name}-1.6-files.patch
+# Do not create libminiupnpc.so.1.5 and libminiupnpc.so.8 linking to it
+Patch1:		%{name}-1.6-version.patch
+# Link to and find libminiupnpc
+Patch2:		%{name}-1.6-tests.patch
+
+%description
+miniupnpc is an implementation of a UPnP client library, enabling
+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.
+
+%package	devel
+Summary:	Development files for miniupnpc 
+Group:		Development/Libraries
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+
+%description	devel
+This package contains the header files and development documentation
+for %{name}.
+
+%package	-n python-%{name}
+Summary:	Python interface to %{name}
+Group:		System Environment/Libraries
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+
+%description	-n python-%{name}
+This package contains python interfaces to %{name}.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+sed -i "s|\(\tpython setup.py install\)$|\1 --root=\$(DESTDIR)/|" Makefile
+
+# version not updated in setup.py
+sed -i 's/"1\.5"/"%{version}"/' setup.py
+
+%build
+mkdir -p build
+pushd build
+%cmake					\
+	-DUPNPC_BUILD_STATIC=OFF	\
+	-DUPNPC_BUILD_TESTS=ON		\
+	..
+    make upnpc-shared all
+popd
+make pythonmodule
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT -C build
+make DESTDIR=$RPM_BUILD_ROOT installpythonmodule
+install -D -m644 man3/miniupnpc.3 $RPM_BUILD_ROOT/%{_mandir}/man3/miniupnpc.3
+
+%check
+make CFLAGS="%{optflags} -DMINIUPNPC_SET_SOCKET_TIMEOUT" check
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%doc Changelog.txt
+%doc LICENSE
+%doc README
+%{_libdir}/libminiupnpc.so.%{major}
+
+%files		devel
+%{_includedir}/miniupnpc
+%{_libdir}/libminiupnpc.so
+%{_mandir}/man3/miniupnpc.3*
+
+%files		-n python-%{name}
+%{python_sitearch}/miniupnpc-%{version}-py?.?.egg-info
+%{python_sitearch}/miniupnpc.so
+
+%changelog
+* Wed May 30 2012 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 1.6-6
+- Add Changelog.txt to documentation.
+- Correct package version in setup.py.
+- Correct rpmlint warning on source rpm.
+- Filter provides of private python shared object (817311#c19).
+
+* Sat May 26 2012 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 1.6-5
+- Build python module (817311#c14).
+
+* Mon May 21 2012 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 1.6-4
+- Use %%name for source and patch names.
+- Enable %%check.
+
+* Mon May 7 2012 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 1.6-3
+- Prefer %%global over %%define.
+- Add proper documentation to main package.
+- Ensure library is built before making simple test programs.
+
+* Wed May 2 2012 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 1.6-2
+- Rename package to miniupnpc to match source tarball.
+- Add patch to enable build of tests.
+- Include manual page to devel package.
+- Change License to match LICENSE file.
+
+* Sat Apr 28 2012 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 1.6-1
+- Initial libminiupnpc spec.
diff --git a/sources b/sources
index e69de29..1610fdf 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+88055f2d4a061cfd4cfe25a9eae22f67  miniupnpc-1.6.tar.gz


More information about the scm-commits mailing list