%bcond_without python %ifarch x86_64 aarch64 s390x %bcond_without check %else %bcond_with check %endif Name: opendht Version: 2.5.1 Release: %autorelease Summary: a C++17 Distributed Hash Table implementation License: GPL-3.0-only URL: https://github.com/savoirfairelinux/opendht Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: ninja-build BuildRequires: cppunit-devel BuildRequires: libargon2-devel BuildRequires: readline-devel BuildRequires: gnutls-devel BuildRequires: msgpack-devel BuildRequires: asio-devel # python binding dependencies BuildRequires: python3-Cython BuildRequires: python3-devel BuildRequires: python3-setuptools %description OpenDHT is a lightweight C++17 Distributed Hash Table implementation. OpenDHT provides an easy to use distributed in-memory data store. Every node in the network can read and write values to the store. Values are distributed over the network, with redundancy. - Lightweight and scalable, designed for large networks and small devices - High resilience to network disruption - Public key cryptography layer providing optional data signature and encryption (using GnuTLS) - IPv4 and IPv6 support - Clean and powerful C++17 map API - Bindings for C, Rust & Python 3 - REST API with optional HTTP client+server with push notification support %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package python3-%{name} Summary: Python 3 bindings for the %{name} BuildRequires: python3-devel Requires: %{name}%{?_isa} = %{version}-%{release} Provides: %{name}-python3 = %{version}-%{release} %description python3-%{name} The python3-%{name} package contains Python bindings for %{name}. %package tools Summary: Tools for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description tools The %{name}-tools package contains tools about %{name}. %prep %autosetup -p1 %build %cmake \ -DCMAKE_BUILD_TYPE=Release \ %if %{with python} -DOPENDHT_PYTHON=ON \ %endif %cmake_build %install %cmake_install %if %{with check} %check %ctest %endif %files %license COPYING %doc README.md %{_libdir}/libopendht.so %files devel %{_libdir}/libopendht.so.2* %{_includedir}/opendht.h %{_includedir}/opendht/ %{_libdir}/cmake/opendht/ %{_libdir}/pkgconfig/opendht.pc %{_datadir}/doc/opendht/ %files python3-%{name} %{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info %{python3_sitearch}/%{name}.cpython-*.so %files tools %{_bindir}/dhtchat %{_bindir}/dhtnode %{_bindir}/dhtscanner %{_bindir}/dhtcluster %{_mandir}/man1/dhtnode.1.gz %changelog %autochangelog