%define soname 1 %define origname opendht %define CMPREFIX %{_prefix} %define CMLIBDIR %{_libdir} %define CMINCDIR %{_includedir} Name: opendht Version: %{soname}.1.0 Release: 1 Summary: A lightweight C++11 Distributed Hash Table implementation License: GPL-3.0+ Group: Productivity/Networking/Other Url: https://github.com/savoirfairelinux/opendht/ Source0: %{origname}-%{version}.tar.xz Patch0: opendht-config-ac.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: gnutls-devel >= 3.3 BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: python3-cython BuildRequires: python3-pip BuildRequires: readline-devel BuildRequires: pkgconfig(hogweed) BuildRequires: pkgconfig(libtasn1) >= 4.8 BuildRequires: pkgconfig(msgpack) >= 1.4.1 BuildRequires: pkgconfig(nettle) BuildRequires: pkgconfig(p11-kit-1) >= 0.23 BuildRequires: pkgconfig(python3) BuildRequires: php-readline BuildRequires: python3-ipython BuildRequires: socat BuildRoot: %{_tmppath}/%{name}-%{version}-build %description A lightweight C++11 Distributed Hash Table implementation - 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 %{_lib}%{name}%{soname} Summary: Library for OpenDHT, a lightweight C++11 Distributed Hash Table implementation Group: Development/Libraries/C and C++ %description -n %{_lib}%{name}%{soname} Library for OpenDHT, a lightweight C++11 Distributed Hash Table implementation %package -n %{_lib}%{name}%{soname}-devel Summary: Development header files for lib%{name} Group: Development/Libraries/C and C++ Requires: %{_lib}%{name}%{soname} = %{version} %description -n %{_lib}%{name}%{soname}-devel Development files for lib%{name}%{soname} %package -n python-%{name} Summary: Python wrapper for OpenDHT Group: Development/Libraries/Python %description -n python-%{name} Python wrapper for OpenDHT %prep %setup -q ###autoreconf -vfi %apply_patches %build ./autogen.sh && ./configure --prefix=/usr --libdir=/usr/%{_lib} ## --with-gnu-ld --disable-python ##### cmake -DOPENDHT_STATIC=OFF -DOPENDHT_PYTHON=ON -DCMAKE_INSTALL_PREFIX=/usr -DOPENDHT_CXX11=ON -DCMAKE_INSTALL_PREFIX=%{CMPREFIX} -DCMAKE_INSTALL_LIBDIR=%{CMLIBDIR} -DCMAKE_INSTALL_INCLUDEDIR=%{CMINCDIR} . %make #make %{?_smp_mflags} %install ##%cmake_install %make_install find %{buildroot} -type f -name "*.la" -delete -print %post -n %{_lib}%{name}%{soname} -p /sbin/ldconfig %postun -n %{_lib}%{name}%{soname} -p /sbin/ldconfig %files %defattr(-,root,root) %{_bindir}/dhtchat %{_bindir}/dhtnode %{_bindir}/dhtscanner %{_mandir}/man1/dhtnode.1.bz2 %doc README.md COPYING %files -n %{_lib}%{name}%{soname} %defattr(-,root,root) %{_libdir}/lib%{name}.so.%{soname}* %files -n %{_lib}%{name}%{soname}-devel %defattr(-,root,root) %dir %{_includedir}/%{name} ####%dir %{_includedir}/%{name}/indexation %{_includedir}/%{name}/*.h ####%{_includedir}/%{name}/indexation/*.h %{_includedir}/%{name}.h %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/lib%{name}.so %{_libdir}/lib%{name}.a %files -n python-%{name} %defattr(-,root,root) %dir %{python3_sitearch}/%{name}-%{version}-py*.egg-info ###%{py3_ver}.egg-info %{python3_sitearch}/%{name}-%{version}-py*.egg-info/* ###%{py3_ver}.egg-info/* %{python3_sitearch}/%{name}.cpython*.so ###%{py3_soflags}.so %changelog * Wed Oct 12 2016 onkelho 1.1.0-1pclos2016 - test newest release * Mon Oct 03 2016 onkelho 0.6.3-1pclos2016 - needed by ring