diff --git a/.gitignore b/.gitignore index 5504844..b183f52 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /miniupnpc-1.8.tar.gz /miniupnpc-1.9.tar.gz /miniupnpc-2.0.tar.gz +/miniupnpc-2.1.tar.gz diff --git a/miniupnpc-python2.patch b/miniupnpc-python2.patch deleted file mode 100644 index e103358..0000000 --- a/miniupnpc-python2.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up miniupnpc-2.0/Makefile.python2 miniupnpc-2.0/Makefile ---- miniupnpc-2.0/Makefile.python2 2016-02-09 10:38:56.000000000 +0100 -+++ miniupnpc-2.0/Makefile 2019-02-06 09:57:03.770120116 +0100 -@@ -162,11 +162,11 @@ check: validateminixml validateminiwget - everything: all $(EXECUTABLES_ADDTESTS) - - pythonmodule: $(LIBRARY) miniupnpcmodule.c setup.py -- python setup.py build -+ python2 setup.py build - touch $@ - - installpythonmodule: pythonmodule -- python setup.py install -+ python2 setup.py install - - pythonmodule3: $(LIBRARY) miniupnpcmodule.c setup.py - python3 setup.py build diff --git a/miniupnpc-tests.patch b/miniupnpc-tests.patch deleted file mode 100644 index a6e2d93..0000000 --- a/miniupnpc-tests.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up miniupnpc-1.9/CMakeLists.txt.orig miniupnpc-1.9/CMakeLists.txt ---- miniupnpc-1.9/CMakeLists.txt.orig 2014-04-16 00:13:30.289068350 -0300 -+++ miniupnpc-1.9/CMakeLists.txt 2014-04-16 00:16:15.527074677 -0300 -@@ -128,25 +128,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 receivedata.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 receivedata.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-version.patch b/miniupnpc-version.patch deleted file mode 100644 index 11193e9..0000000 --- a/miniupnpc-version.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- CMakeLists.txt.orig 2016-06-08 10:22:31.058083356 +0200 -+++ CMakeLists.txt 2016-06-08 10:22:49.698117692 +0200 -@@ -118,7 +118,6 @@ - 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 index b8b96a7..2783973 100644 --- a/miniupnpc.spec +++ b/miniupnpc.spec @@ -4,25 +4,19 @@ %else %global with_python3 0 %endif -%global major 16 +%global major 17 %filter_provides_in %{python_sitearch}/.*\.so$ Summary: Library and tool to control NAT in UPnP-enabled routers Name: miniupnpc -Version: 2.0 -Release: 13%{?dist} +Version: 2.1 +Release: 1%{?dist} License: BSD URL: http://miniupnp.free.fr/ Source: http://miniupnp.free.fr/files/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: cmake BuildRequires: python2-devel -# Do not create libminiupnpc.so.%%{version} and libminiupnpc.so.%%{major} linking to it -Patch0: %{name}-version.patch -# Link to and find libminiupnpc -Patch1: %{name}-tests.patch -# Explicitly use python2 instead of unversioned python -Patch2: miniupnpc-python2.patch Source1: USAGE %description @@ -61,47 +55,29 @@ This package contains python3 interfaces to %{name}. %endif %prep -%setup -q -%patch0 -p0 -%patch1 -p1 -%patch2 -p1 +%autosetup -p1 cp %{SOURCE1} . -sed -i "s|\(\tpython2 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\.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 -pushd build -%cmake \ - -DUPNPC_BUILD_STATIC=OFF \ - -DUPNPC_BUILD_TESTS=ON \ - .. - make upnpc-shared all -popd -make pythonmodule +%py2_build %if %{with_python3} -make pythonmodule3 +%py3_build %endif -make upnpc-shared + +%make_build %install -make install DESTDIR=$RPM_BUILD_ROOT -C build -make DESTDIR=$RPM_BUILD_ROOT installpythonmodule +%py2_install %if %{with_python3} -make DESTDIR=$RPM_BUILD_ROOT installpythonmodule3 +%py3_install %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 + +%set_build_flags +%make_install INSTALLPREFIX=%{_prefix} LIBDIR=%{_lib} + +chmod +x $RPM_BUILD_ROOT%{_libdir}/libminiupnpc.so.%{major} + +rm $RPM_BUILD_ROOT%{_libdir}/*.a %check make CFLAGS="%{optflags} -DMINIUPNPC_SET_SOCKET_TIMEOUT" check @@ -113,12 +89,14 @@ make CFLAGS="%{optflags} -DMINIUPNPC_SET_SOCKET_TIMEOUT" check %doc LICENSE %doc README %{_libdir}/libminiupnpc.so.%{major} +%{_bindir}/external-ip %{_bindir}/upnpc %doc USAGE %files devel %{_includedir}/miniupnpc %{_libdir}/libminiupnpc.so +%{_libdir}/pkgconfig/miniupnpc.pc %{_mandir}/man3/miniupnpc.3* %files -n python2-%{name} @@ -132,6 +110,9 @@ make CFLAGS="%{optflags} -DMINIUPNPC_SET_SOCKET_TIMEOUT" check %endif %changelog +* Wed Feb 06 2019 Kalev Lember - 2.1-1 +- Update to 2.1 + * Wed Feb 06 2019 Kalev Lember - 2.0-13 - Fix FTBFS (#1604853) diff --git a/sources b/sources index 3eea50c..88a2779 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2acc4ec912c15447a40cf14ae50df7b9 miniupnpc-2.0.tar.gz +SHA512 (miniupnpc-2.1.tar.gz) = 0af5c573206e0147f8e20cd84c394164a784cf385f3978b7ca414cc2b2e530d6af40a21de5c9d8459d31db249e06667757e723767b1d4cd0a4ec5497ad239c23