%define major 5 %define libname %mklibname zmq %{major} %define develname %mklibname zmq -d Summary: Software library for fast, message-based applications Name: zeromq Version: 4.3.5 Release: %mkrel 1 Url: https://www.zeromq.org/ License: LGPLv3+ Group: Development/Other Source0: https://github.com/zeromq/libzmq/releases/download/v%{version}/zeromq-%{version}.tar.gz Patch0: zeromq-4.3.3-mga-link_pgm-5.3.patch # Modified from FindSodium.cmake Source2: FindUnwind.cmake BuildRequires: asciidoc BuildRequires: cmake BuildRequires: pkgconfig(gnutls) >= 3.6.7 BuildRequires: pkgconfig(libsodium) BuildRequires: pkgconfig(libunwind) BuildRequires: pkgconfig(openpgm-5.3) %description The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialized messaging middle-ware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. %package -n %{libname} Summary: Software library for fast, message-based applications Group: System/Libraries Obsoletes: %{_lib}zeromq5 < 4.3.3 %description -n %{libname} The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialized messaging middle-ware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. This package contains the %{name} shared library. %package -n %{develname} Summary: Development files for %{name} Group: Development/C Requires: %{libname} = %{version}-%{release} Requires: %{name}-utils = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Obsoletes: %{_lib}zeromq-devel < 4.3.3 %description -n %{develname} The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialized messaging middle-ware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. This package contains the libraries and header files needed to develop applications that use %{name}. %package utils Summary: Utility binaries for zeromq Group: Development/C %description utils Utility binaries for zeromq %prep %autosetup -p1 # find libunwind install -pm644 %{SOURCE2} FindUnwind.cmake # Fix lib path in .pc sed -i 's:@libdir@:%{_libdir}:' src/libzmq.pc.in %build %cmake \ -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{libname} \ -DWITH_OPENPGM:BOOL=ON \ -DWITH_LIBSODIUM:BOOL=ON \ -DENABLE_DRAFTS:BOOL=ON \ -DBUILD_STATIC:BOOL=OFF\ -DZMQ_BUILD_TESTS=OFF # Tests fail to build in 4.3.5 %cmake_build # tests locally OK, fails in BS %if 0 %check %ctest %endif %install %cmake_install # Docs get installed in wrong places mkdir -p %{buildroot}%{_docdir}/%{libname} mv %{buildroot}%{_usr}/doc/zmq/* %{buildroot}%{_datadir}/doc/%{libname}/ mv %{buildroot}%{_datadir}/zmq/* %{buildroot}%{_datadir}/doc/%{libname}/ # we don't want these find %{buildroot} -name "*.la" -delete %files -n %{libname} %{_libdir}/libzmq.so.%{major}{,.*} %files -n %{develname} %doc %{_docdir}/%{libname}/* %{_libdir}/libzmq.so %{_libdir}/pkgconfig/libzmq.pc %{_includedir}/zmq* %dir %{_libdir}/cmake/ZeroMQ %{_libdir}/cmake/ZeroMQ/*.cmake %files utils %{_bindir}/inproc_lat %{_bindir}/inproc_thr %{_bindir}/local_lat %{_bindir}/local_thr %{_bindir}/remote_lat %{_bindir}/remote_thr %{_bindir}/proxy_thr