# source https://github.com/savoirfairelinux/opendht %define CMPREFIX %{_prefix} %define CMLIBDIR %{_libdir} %define CMINCDIR %{_includedir} %global origname opendht %global major 1 %global libname %mklibname %{origname} %{major} %global develname %mklibname %{origname} -d Name: dhtnode Version: 1.0.2 Release: %mkrel 1 Summary: A lightweight C++11 Distributed Hash Table implementation License: GPLv3 Group: Networking/Other URL: https://github.com/savoirfairelinux/opendht Source0: %{origname}-%{version}.tar.xz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: %{_lib}gnutls-devel BuildRequires: %{_lib}msgpack-devel BuildRequires: %{_lib}nettle-devel BuildRequires: %{_lib}readline-devel BuildRequires: pkgconfig Requires: %{libname} = %{version}-%{release} %description OpenDHT node binary, which is originally based on https://github.com/jech/dht by Juliusz Chroboczek. - Light and fast C++11 Kademlia DHT library. - Distributed shared key->value data-store - Clean and powerful distributed map API with storage of arbitrary binary values of up to 56 KB. - Optional public key cryptography layer providing data signature and encryption (using GnuTLS). - IPv4 and IPv6 support. - Python binding. %package -n %{libname} Summary: Library for %{name} Group: System/Libraries Provides: lib%{origname} = %{version}-%{release} Obsoletes: %{_lib}opendht0 < %{version}-%{release} %description -n %{libname} Library for OpenDHT. %package -n %{develname} Summary: Library for %{name} Group: System/Libraries Requires: %{libname} = %{version}-%{release} Provides: lib%{origname}-devel = %{version}-%{release} %description -n %{develname} Development files for OpenDHT. %prep %setup -qn %{origname}-%{version} autoreconf -vfi %build ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc && ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc #cmake -C -DOPENDHT_STATIC=OFF -DOPENDHT_PYTHON=ON -DCMAKE_INSTALL_PREFIX=/usr -DOPENDHT_CXX11=ONcmake -DCMAKE_INSTALL_PREFIX=%{CMPREFIX} -DCMAKE_INSTALL_LIBDIR=%{CMLIBDIR} -DCMAKE_INSTALL_INCLUDEDIR=%{CMINCDIR} . %make %install %make_install #### -C build %files %defattr(-,root,root) %doc COPYING README.md %{_bindir}/dht* %{_mandir}/man1/%{name}.* %files -n %{libname} %defattr(-,root,root) %{_libdir}/libopendht.so.%{major}* %files -n %{develname} %defattr(-,root,root) %{_libdir}/libopendht.so %{_libdir}/pkgconfig/%{origname}.pc %{_includedir}/%{origname} %{_includedir}/%{origname}.h %changelog * Mon Oct 03 2016 onkelho 1.0.2-1pclos2016 - update to 1.0.1 * Fri Sep 02 2016 marcin82 1.0.0-1pclos2016 - update * Tue Aug 18 2016 marcin82 0.6.3-1pclos2016 - initial build for PCLinuxOS