Name: opendht Version: 3.7.9 Release: 1%{?dist} Summary: C++17 Distributed Hash Table implementation License: GPL-3.0-or-later URL: https://github.com/savoirfairelinux/opendht Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig # systemd scriptlet + _unitdir macros BuildRequires: systemd-rpm-macros # library dependencies BuildRequires: readline-devel BuildRequires: gnutls-devel BuildRequires: msgpack-devel BuildRequires: asio-devel BuildRequires: libargon2-devel BuildRequires: fmt-devel BuildRequires: jsoncpp-devel BuildRequires: simdutf-devel # HTTP server/client (proxy + push notifications) BuildRequires: restinio BuildRequires: redhat-rpm-config %description OpenDHT is a lightweight C++17 Distributed Hash Table implementation. It is the distributed network layer used by the Jami communication platform and provides a DHT proxy server/client and optional push notification support. This package contains the shared libraries, the dhtnode daemon and the companion command line tools. %package devel Summary: Development files for OpenDHT Requires: %{name}%{?_isa} = %{version}-%{release} # Header-only / template-heavy: pull in the upstream headers consumers need. Requires: msgpack-devel Requires: fmt-devel Requires: gnutls-devel Requires: libargon2-devel Requires: jsoncpp-devel Requires: simdutf-devel Requires: readline %description devel Headers, CMake package configuration and pkg-config files required to build applications against OpenDHT, including the C binding (libopendht-c). %prep %autosetup -p1 %build %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DBUILD_TESTING=OFF \ -DOPENDHT_PYTHON=OFF \ -DOPENDHT_C=OFF \ -DOPENDHT_PROXY_SERVER=ON \ -DOPENDHT_PROXY_SERVER_IDENTITY=ON \ -DOPENDHT_PROXY_CLIENT=ON \ -DOPENDHT_PUSH_NOTIFICATIONS=ON \ -DOPENDHT_EXAMPLES=OFF \ -DOPENDHT_SYSTEMD=ON \ -DOPENDHT_SYSTEMD_UNIT_FILE_LOCATION=%{_unitdir} \ -DOPENDHT_DOCUMENTATION=OFF %cmake_build %install %cmake_install # Ship the example dhtnode configuration as the system default if upstream # did not already install one under %{_sysconfdir}. if [ ! -f %{buildroot}%{_sysconfdir}/dhtnode.conf ]; then install -m 0644 tools/systemd/dhtnode.conf %{buildroot}%{_sysconfdir}/dhtnode.conf fi %check # Build with -DBUILD_TESTING=OFF; nothing to run. # --- systemd scriptlets for the dhtnode service --- %post %systemd_post dhtnode.service %preun %systemd_preun dhtnode.service %postun %systemd_postun_with_restart dhtnode.service %ldconfig_scriptlets %files %{_bindir}/dhtnode # runtime shared libraries (versioned) %{_libdir}/libopendht.so.* # daemon service + configuration %{_unitdir}/dhtnode.service %config(noreplace) %{_sysconfdir}/dhtnode.conf %{_mandir}/man1/dhtnode.1* %files devel %{_includedir}/opendht/ %{_includedir}/opendht.h %{_libdir}/libopendht.so %{_libdir}/pkgconfig/opendht.pc %{_libdir}/cmake/opendht/ %changelog * Fri May 29 2026 vx32 - 3.7.9-1 - Initial package of OpenDHT 3.7.9 for Jami - Install dhtnode systemd service and /etc/opendht configuration