[miniupnpc] Update to latest upstream release (#996357)
pcpa
pcpa at fedoraproject.org
Wed Aug 14 16:44:32 UTC 2013
commit 7e21e4586e4a6ebc53e8c1eff9367b76512308d7
Author: pcpa <paulo.cesar.pereira.de.andrade at gmail.com>
Date: Wed Aug 14 13:43:52 2013 -0300
Update to latest upstream release (#996357)
.gitignore | 1 +
miniupnpc-1.6-files.patch | 20 -------
miniupnpc-files.patch | 12 ++++
miniupnpc-1.6-tests.patch => miniupnpc-tests.patch | 12 ++--
...pc-1.6-version.patch => miniupnpc-version.patch | 17 +++++--
miniupnpc.spec | 58 +++++++++++++++++---
sources | 2 +-
7 files changed, 83 insertions(+), 39 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 514d241..2599338 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/miniupnpc-1.6.tar.gz
+/miniupnpc-1.8.tar.gz
diff --git a/miniupnpc-files.patch b/miniupnpc-files.patch
new file mode 100644
index 0000000..2087113
--- /dev/null
+++ b/miniupnpc-files.patch
@@ -0,0 +1,12 @@
+diff -up miniupnpc-1.8/CMakeLists.txt.orig miniupnpc-1.8/CMakeLists.txt
+--- miniupnpc-1.8/CMakeLists.txt.orig 2013-08-13 10:02:05.237748142 -0300
++++ miniupnpc-1.8/CMakeLists.txt 2013-08-13 10:02:14.308748490 -0300
+@@ -165,6 +165,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-tests.patch
similarity index 78%
rename from miniupnpc-1.6-tests.patch
rename to miniupnpc-tests.patch
index fc54a69..9fb4bc9 100644
--- a/miniupnpc-1.6-tests.patch
+++ b/miniupnpc-tests.patch
@@ -1,7 +1,7 @@
-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)
+diff -up miniupnpc-1.8/CMakeLists.txt.orig miniupnpc-1.8/CMakeLists.txt
+--- miniupnpc-1.8/CMakeLists.txt.orig 2013-08-13 10:04:23.583753440 -0300
++++ miniupnpc-1.8/CMakeLists.txt 2013-08-13 10:05:03.228754958 -0300
+@@ -128,25 +128,25 @@ if (UPNPC_BUILD_TESTS)
target_link_libraries (testminixml ${LDLIBS})
add_executable (minixmlvalid minixmlvalid.c minixml.c)
@@ -16,7 +16,7 @@ diff -up miniupnpc-1.6/CMakeLists.txt.orig miniupnpc-1.6/CMakeLists.txt
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
+ portlistingparse.c receivedata.c
)
- target_link_libraries (testigddescparse ${LDLIBS})
+ target_link_libraries (testigddescparse ${LDLIBS} -L. -lminiupnpc)
@@ -24,7 +24,7 @@ diff -up miniupnpc-1.6/CMakeLists.txt.orig miniupnpc-1.6/CMakeLists.txt
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
+ portlistingparse.c receivedata.c
)
- target_link_libraries (testminiwget ${LDLIBS})
+ target_link_libraries (testminiwget ${LDLIBS} -L. -lminiupnpc)
diff --git a/miniupnpc-1.6-version.patch b/miniupnpc-version.patch
similarity index 50%
rename from miniupnpc-1.6-version.patch
rename to miniupnpc-version.patch
index f4cce8e..2692c18 100644
--- a/miniupnpc-1.6-version.patch
+++ b/miniupnpc-version.patch
@@ -1,7 +1,16 @@
-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)
+diff -up miniupnpc-1.8/CMakeLists.txt.orig miniupnpc-1.8/CMakeLists.txt
+--- miniupnpc-1.8/CMakeLists.txt.orig 2013-08-13 10:28:07.207807956 -0300
++++ miniupnpc-1.8/CMakeLists.txt 2013-08-13 10:28:22.476808540 -0300
+@@ -1,7 +1,7 @@
+ cmake_minimum_required (VERSION 2.6)
+
+ project (miniupnpc C)
+-set (MINIUPNPC_VERSION 1.7)
++set (MINIUPNPC_VERSION 1.8)
+ set (MINIUPNPC_API_VERSION 9)
+
+ if (NOT CMAKE_BUILD_TYPE)
+@@ -117,7 +117,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")
diff --git a/miniupnpc.spec b/miniupnpc.spec
index 07bb173..1f29ba8 100644
--- a/miniupnpc.spec
+++ b/miniupnpc.spec
@@ -1,23 +1,31 @@
-%global major 8
+%if 0%{?fedora} >= 18
+%global with_python3 1
+%global basepy3dir %(echo ../`basename %{py3dir}`)
+%else
+%global with_python3 0
+%endif
+# Possibly wrong due to other version information mismatches
+# but only patch where it calls itself version 1.7.
+%global major 9
%filter_provides_in %{python_sitearch}/.*\.so$
Summary: Library and tool to control NAT in UPnP-enabled routers
Name: miniupnpc
-Version: 1.6
-Release: 10%{?dist}
+Version: 1.8
+Release: 1%{?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
+BuildRequires: python2-devel
# Install headers and add extra file to compilation
# Patch originally from Mageia Linux
-Patch0: %{name}-1.6-files.patch
+Patch0: %{name}-files.patch
# Do not create libminiupnpc.so.1.5 and libminiupnpc.so.8 linking to it
-Patch1: %{name}-1.6-version.patch
+Patch1: %{name}-version.patch
# Link to and find libminiupnpc
-Patch2: %{name}-1.6-tests.patch
+Patch2: %{name}-tests.patch
Source1: USAGE
%description
@@ -46,6 +54,17 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python-%{name}
This package contains python interfaces to %{name}.
+%if %{with_python3}
+%package -n python3-%{name}
+Summary: Python3 interface to %{name}
+Group: System Environment/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+BuildRequires: python3-devel
+
+%description -n python3-%{name}
+This package contains python3 interfaces to %{name}.
+%endif
+
%prep
%setup -q
%patch0 -p1
@@ -54,9 +73,16 @@ This package contains python interfaces to %{name}.
cp %{SOURCE1} .
sed -i "s|\(\tpython setup.py install\)$|\1 --root=\$(DESTDIR)/|" Makefile
+%if %{with_python3}
+sed -i "s|\(\tpython3 setup.py install\)$|\1 --root=\$(DESTDIR)/|" Makefile
+%endif
# version not updated in setup.py
-sed -i 's/"1\.5"/"%{version}"/' setup.py
+sed -i 's/"1\.7"/"%{version}"/' setup.py
+
+# Changelog says added -ansi without reason, but that
+# breaks C files (python module) using C++ comments
+sed -i 's/\(CFLAGS += -ansi\)/#\1/' Makefile
%build
mkdir -p build
@@ -68,11 +94,17 @@ pushd build
make upnpc-shared all
popd
make pythonmodule
+%if %{with_python3}
+make pythonmodule3
+%endif
make upnpc-shared
%install
make install DESTDIR=$RPM_BUILD_ROOT -C build
make DESTDIR=$RPM_BUILD_ROOT installpythonmodule
+%if %{with_python3}
+make DESTDIR=$RPM_BUILD_ROOT installpythonmodule3
+%endif
install -D -m644 man3/miniupnpc.3 $RPM_BUILD_ROOT/%{_mandir}/man3/miniupnpc.3
install -D -m 0755 upnpc-shared $RPM_BUILD_ROOT%{_bindir}/upnpc
@@ -100,7 +132,17 @@ make CFLAGS="%{optflags} -DMINIUPNPC_SET_SOCKET_TIMEOUT" check
%{python_sitearch}/miniupnpc-%{version}-py?.?.egg-info
%{python_sitearch}/miniupnpc.so
+%if %{with_python3}
+%files -n python3-%{name}
+%{python3_sitearch}/miniupnpc-%{version}-py?.?.egg-info
+%{python3_sitearch}/miniupnpc*.so
+%endif
+
%changelog
+* Tue Aug 13 2013 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 1.8-1
+- Update to latest upstream release (#996357)
+- Build extra python3 module
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/sources b/sources
index 1610fdf..0a39c23 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-88055f2d4a061cfd4cfe25a9eae22f67 miniupnpc-1.6.tar.gz
+065bf20a20ebe605c675b7a5aaef340a miniupnpc-1.8.tar.gz
More information about the scm-commits
mailing list