[packages/miniupnpc] - updated to 2.2.3 - added make patch (adjust make install for separate BUILD dir) - dropped python

qboosh qboosh at pld-linux.org
Sun Jul 10 13:37:45 CEST 2022


commit 293105cb750ce7c4b9c59a087b4e54ea57055d19
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jul 10 13:39:28 2022 +0200

    - updated to 2.2.3
    - added make patch (adjust make install for separate BUILD dir)
    - dropped python 2.4 support

 miniupnpc-make.patch | 31 +++++++++++++++++++++++++++++++
 miniupnpc.spec       | 20 +++++++++++---------
 2 files changed, 42 insertions(+), 9 deletions(-)
---
diff --git a/miniupnpc.spec b/miniupnpc.spec
index 37c7915..274cb46 100644
--- a/miniupnpc.spec
+++ b/miniupnpc.spec
@@ -6,15 +6,16 @@
 Summary:	MiniUPnP client and a library
 Summary(pl.UTF-8):	Program i biblioteka kliencka MiniUPnP
 Name:		miniupnpc
-Version:	2.1
-Release:	6
+Version:	2.2.3
+Release:	1
 License:	BSD
 Group:		Libraries
 Source0:	http://miniupnp.tuxfamily.org/files/%{name}-%{version}.tar.gz
-# Source0-md5:	80143183f743d402459095711b1ce793
+# Source0-md5:	4a037c6f22861d58e037fcb0bdc5922e
+Patch0:		%{name}-make.patch
 URL:		http://miniupnp.tuxfamily.org/
 %if %{with python2}
-BuildRequires:	python-devel >= 2
+BuildRequires:	python-devel >= 1:2.5
 BuildRequires:	python-setuptools
 %endif
 %if %{with python3}
@@ -84,11 +85,15 @@ Wiązanie Pythona 3 do biblioteki miniupnpc.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
+# there is also cmake support, but also not up to date (see cmake patch in Fedora)'
+CFLAGS="%{rpmcflags}" \
+CPPFLAGS="%{rpmcppflags}" \
+LDFLAGS="%{rpmldflags}" \
 %{__make} \
 	CC="%{__cc}" \
-	CFLAGS="%{rpmcflags} -fPIC -Wall -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600" \
 	LIBDIR=%{_lib}
 
 %if %{with python2}
@@ -103,7 +108,7 @@ Wiązanie Pythona 3 do biblioteki miniupnpc.
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
-	INSTALLPREFIX=$RPM_BUILD_ROOT%{_prefix} \
+	DESTDIR=$RPM_BUILD_ROOT \
 	LIBDIR=%{_lib}
 
 # let SONAME be the symlink
@@ -134,7 +139,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %files devel
 %defattr(644,root,root,755)
-%doc upnpc.c
 %attr(755,root,root) %{_libdir}/libminiupnpc.so
 %{_includedir}/miniupnpc
 %{_pkgconfigdir}/miniupnpc.pc
@@ -149,10 +153,8 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc pymoduletest.py testupnpigd.py
 %attr(755,root,root) %{py_sitedir}/miniupnpc.so
-%if "%{py_ver}" > "2.4"
 %{py_sitedir}/miniupnpc-%{version}-py*.egg-info
 %endif
-%endif
 
 %if %{with python3}
 %files -n python3-miniupnpc
diff --git a/miniupnpc-make.patch b/miniupnpc-make.patch
new file mode 100644
index 0000000..9e7875a
--- /dev/null
+++ b/miniupnpc-make.patch
@@ -0,0 +1,31 @@
+--- miniupnpc-2.2.3/Makefile.orig	2021-09-28 23:11:31.000000000 +0200
++++ miniupnpc-2.2.3/Makefile	2022-07-10 11:34:53.380100847 +0200
+@@ -162,7 +162,7 @@ PKGCONFIGDIR = $(INSTALLDIRLIB)/pkgconfi
+ 
+ FILESTOINSTALL = $(LIBRARY) $(EXECUTABLES)
+ ifeq (, $(findstring amiga, $(OS)))
+-FILESTOINSTALL += $(SHAREDLIBRARY) miniupnpc.pc
++FILESTOINSTALL += $(SHAREDLIBRARY) $(BUILD)/miniupnpc.pc
+ endif
+ 
+ 
+@@ -251,15 +251,15 @@ ifeq (, $(findstring amiga, $(OS)))
+ 	$(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(INSTALLDIRLIB)
+ ifeq (, $(findstring amiga, $(OS)))
+ 	$(INSTALL) -m 644 $(SHAREDLIBRARY) $(DESTDIR)$(INSTALLDIRLIB)/$(SONAME)
+-	ln -fs $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(SHAREDLIBRARY)
++	ln -fs $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(notdir $(SHAREDLIBRARY))
+ 	$(INSTALL) -d $(DESTDIR)$(PKGCONFIGDIR)
+-	$(INSTALL) -m 644 miniupnpc.pc $(DESTDIR)$(PKGCONFIGDIR)
++	$(INSTALL) -m 644 $(BUILD)/miniupnpc.pc $(DESTDIR)$(PKGCONFIGDIR)
+ endif
+ 	$(INSTALL) -d $(DESTDIR)$(INSTALLDIRBIN)
+ ifneq (, $(findstring amiga, $(OS)))
+-	$(INSTALL) -m 755 upnpc-static $(DESTDIR)$(INSTALLDIRBIN)/upnpc
++	$(INSTALL) -m 755 $(BUILD)/upnpc-static $(DESTDIR)$(INSTALLDIRBIN)/upnpc
+ else
+-	$(INSTALL) -m 755 upnpc-shared $(DESTDIR)$(INSTALLDIRBIN)/upnpc
++	$(INSTALL) -m 755 $(BUILD)/upnpc-shared $(DESTDIR)$(INSTALLDIRBIN)/upnpc
+ endif
+ 	$(INSTALL) -m 755 external-ip.sh $(DESTDIR)$(INSTALLDIRBIN)/external-ip
+ ifeq (, $(findstring amiga, $(OS)))
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/miniupnpc.git/commitdiff/293105cb750ce7c4b9c59a087b4e54ea57055d19



More information about the pld-cvs-commit mailing list