[packages/nanomsg] - updated to 1.1.5 (new soname) - added nolibs patch (kill unnecessary -lanl -lnsl)
qboosh
qboosh at pld-linux.org
Wed Apr 29 17:39:26 CEST 2020
commit 35288dbf7a7fb9f4b82730c581d78ba444d4ea44
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Apr 29 17:39:42 2020 +0200
- updated to 1.1.5 (new soname)
- added nolibs patch (kill unnecessary -lanl -lnsl)
nanomsg-nolibs.patch | 15 ++++++++++++
nanomsg.spec | 64 ++++++++++++++++++++++++++++++----------------------
2 files changed, 52 insertions(+), 27 deletions(-)
---
diff --git a/nanomsg.spec b/nanomsg.spec
index 9881712..8ff0b0f 100644
--- a/nanomsg.spec
+++ b/nanomsg.spec
@@ -5,19 +5,17 @@
Summary: High-performance implementation of several "scalability protocols"
Summary(pl.UTF-8): Wydajna implementacja kilku "protokołów skalowalności"
Name: nanomsg
-Version: 0.5
+Version: 1.1.5
Release: 1
License: MIT
Group: Libraries
-#Source0Download: http://nanomsg.org/download.html
-Source0: http://download.nanomsg.org/%{name}-%{version}-beta.tar.gz
-# Source0-md5: 65a79eabfc33e7a55e2293e12c367f73
-URL: http://nanomsg.org/
-BuildRequires: asciidoc
-BuildRequires: autoconf >= 2.53
-BuildRequires: automake >= 1.6
-BuildRequires: libtool >= 2:2
-BuildRequires: xmlto
+#Source0Download: https://github.com/nanomsg/nanomsg/releases
+Source0: https://github.com/nanomsg/nanomsg/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 272db464bac1339b6cea060dd63b22d4
+Patch0: %{name}-nolibs.patch
+URL: https://nanomsg.org/
+BuildRequires: cmake >= 2.8.12
+BuildRequires: ruby-asciidoctor
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -57,29 +55,41 @@ Static nanomsg library.
Statyczna biblioteka nanomsg.
%prep
-%setup -q -n %{name}-%{version}-beta
+%setup -q
+%patch0 -p1
%build
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__automake}
-%configure \
- --enable-doc \
- --disable-silent-rules \
- %{!?with_static_libs:--disable-static}
+%if %{with static_libs}
+install -d build-static
+cd build-static
+%cmake .. \
+ -DNN_STATIC_LIB=ON \
+ -DCMAKE_INSTALL_LIDBIR=%{_lib}
+
+%{__make}
+cd ..
+%endif
+
+install -d build
+cd build
+%cmake .. \
+ -DCMAKE_INSTALL_LIDBIR=%{_lib}
+
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install \
+%if %{with static_libs}
+%{__make} -C build-static install \
+ DESTDIR=$RPM_BUILD_ROOT
+%endif
+
+%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-# obsoleted by pkg-config
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnanomsg.la
# HTML version of man pages (generated from the same asciidoc sources)
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nanomsg
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/*.html
%clean
rm -rf $RPM_BUILD_ROOT
@@ -89,18 +99,18 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog README
+%doc AUTHORS COPYING README.md SUPPORT
%attr(755,root,root) %{_bindir}/nanocat
-%attr(755,root,root) %{_bindir}/nn_*
%attr(755,root,root) %{_libdir}/libnanomsg.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libnanomsg.so.0
+%attr(755,root,root) %ghost %{_libdir}/libnanomsg.so.5
%{_mandir}/man1/nanocat.1*
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libnanomsg.so
%{_includedir}/nanomsg
-%{_pkgconfigdir}/libnanomsg.pc
+%{_pkgconfigdir}/nanomsg.pc
+%{_libdir}/cmake/nanomsg-%{version}
%{_mandir}/man3/nn_*.3*
%{_mandir}/man7/nanomsg.7*
%{_mandir}/man7/nn_*.7*
diff --git a/nanomsg-nolibs.patch b/nanomsg-nolibs.patch
new file mode 100644
index 0000000..6cc746e
--- /dev/null
+++ b/nanomsg-nolibs.patch
@@ -0,0 +1,15 @@
+--- nanomsg-1.1.5/CMakeLists.txt.orig 2018-10-15 15:50:59.000000000 +0200
++++ nanomsg-1.1.5/CMakeLists.txt 2020-04-29 08:07:48.706914542 +0200
+@@ -238,12 +238,9 @@
+ nn_check_func (kqueue NN_HAVE_KQUEUE)
+ nn_check_func (poll NN_HAVE_POLL)
+
+- nn_check_lib (anl getaddrinfo_a NN_HAVE_GETADDRINFO_A)
+ nn_check_lib (rt clock_gettime NN_HAVE_CLOCK_GETTIME)
+ nn_check_lib (rt sem_wait NN_HAVE_SEMAPHORE_RT)
+ nn_check_lib (pthread sem_wait NN_HAVE_SEMAPHORE_PTHREAD)
+- nn_check_lib (nsl gethostbyname NN_HAVE_LIBNSL)
+- nn_check_lib (socket socket NN_HAVE_LIBSOCKET)
+
+ nn_check_sym (CLOCK_MONOTONIC time.h NN_HAVE_CLOCK_MONOTONIC)
+ nn_check_sym (atomic_cas_32 atomic.h NN_HAVE_ATOMIC_SOLARIS)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nanomsg.git/commitdiff/35288dbf7a7fb9f4b82730c581d78ba444d4ea44
More information about the pld-cvs-commit
mailing list