diff options
author | Michel Alexandre Salim <salimma@fedoraproject.org> | 2020-11-11 17:31:15 -0800 |
---|---|---|
committer | Michel Alexandre Salim <salimma@fedoraproject.org> | 2020-11-11 17:31:15 -0800 |
commit | d8f646828e0f30a23ddac6182ff13fa3a4958ee3 (patch) | |
tree | 7bfc42f63a30f37be6537a832f4d2c80d8b3aacb | |
parent | 0a4f409df31e6b250e97b64c2a13f4ed55f5364a (diff) | |
download | specs-d8f646828e0f30a23ddac6182ff13fa3a4958ee3.tar.gz specs-d8f646828e0f30a23ddac6182ff13fa3a4958ee3.tar.xz specs-d8f646828e0f30a23ddac6182ff13fa3a4958ee3.zip |
+ fbzmq
-rw-r--r-- | net/fbzmq.spec | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/net/fbzmq.spec b/net/fbzmq.spec new file mode 100644 index 0000000..950d538 --- /dev/null +++ b/net/fbzmq.spec @@ -0,0 +1,141 @@ +%bcond_without static + +# no tests yet +%bcond_with tests + +Name: fbzmq +Version: 2020.11.09.00 +Release: 1%{?dist} +Summary: Framework for writing services in C++ while leveraging libzmq + +License: MIT +URL: https://github.com/facebook/fbzmq +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: %{name}-override_ver.patch +Patch1: %{name}-install_dirs.patch +Patch2: %{name}-fbthrift_shared.patch + +# Folly is known not to work on big-endian CPUs +# TODO: file bz +ExcludeArch: s390x + +BuildRequires: cmake +BuildRequires: gcc-c++ +# Library dependencies +BuildRequires: fbthrift-devel +BuildRequires: fizz-devel +BuildRequires: folly-devel +BuildRequires: wangle-devel +BuildRequires: zeromq-devel + +%description + +fbzmq provides a framework for writing services in C++ while leveraging the +awesomeness of libzmq (message passing semantics). At a high level it provides + +- Lightweight C++ wrapper over libzmq which leverages newer C++ constructs and + stricter type checking. Most notably it provides the ability to send/receive + thrift objects as messages over wire without worrying about wire + encoding/decoding protocols. +- Powerful Async Framework with EventLoop, Timeouts, SignalHandler and more to + enable developers to write asynchronous applications efficiently. +- Suite of monitoring tools that make it easy to add logging and counters to + your service. + + + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: cmake-filesystem + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%if %{with static} +%global _static_builddir static_build + +%package static +Summary: Static development libraries for %{name} +BuildRequires: fbthrift-static +BuildRequires: fizz-static +BuildRequires: folly-static +BuildRequires: wangle-static +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description static +The %{name}-static package contains static libraries for +developing applications that use %{name}. +%endif + + +%prep +%autosetup -p1 + + +%build +%if %{with static} +# static build +mkdir %{_static_builddir} +pushd %{_static_builddir} +%cmake .. \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_INSTALL_DIR=%{_libdir}/cmake/%{name}-static \ + -DFBTHRIFT_ROOT=%{_libdir}/cmake/fbthrift-static \ + -DFIZZ_ROOT=%{_libdir}/cmake/fizz-static \ + -DFOLLY_ROOT=%{_libdir}/cmake/folly-static \ + -DWANGLE_ROOT=%{_libdir}/cmake/wangle-static +%cmake_build +popd +%endif + +%cmake \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_INSTALL_DIR=%{_libdir}/cmake/%{name} \ + -DPACKAGE_VERSION={version} \ + -DSO_VERSION={version} +%cmake_build + + +%install +%if %{with_static} +pushd %{_static_builddir} +%cmake_install +popd +%endif + +%cmake_install + +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' + + +%if %{with tests} +%check +%ctest +%endif + + +%files +%license LICENSE +%doc README.md +%{_libdir}/*.so.* + +%files devel +%license LICENSE-examples +%doc CODE_OF_CONDUCT.md CONTRIBUTING.md fbzmq/examples +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/cmake/%{name} + +%if %{with static} +%files static +%{_libdir}/*.a +%{_libdir}/cmake/%{name}-static +%endif + + +%changelog +* Wed Nov 11 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 2020.11.09.00-1 +- Initial package |