%define project_name cpp-ethereum %define date 20160911 %define major 1 %define llvm_major 0.9 %define libname %mklibname ethereum %{major} %define develname %mklibname ethereum -d %define _disable_ld_no_undefined 1 %define libscrypt %mklibname scrypt %{major} %define develscrypt %mklibname scrypt -d %define libevmjit %mklibname evmjit %{llvm_major} %define develevmjit %mklibname evmjit -d %ifarch amd64 x86_64 %define evmjit 1 %else %define evmjit 0 %endif Summary: Ethereum C++ client Name: cpp-ethereum Version: 1.3.0 Release: %mkrel 0.%{date}.6 License: GPLv3 Group: Networking/Other Url: https://github.com/ethereum/cpp-ethereum Source0: cpp-ethereum-%{date}.tar.bz2 Patch0: cpp-ethereum-1.3.0-lvm.patch BuildRequires: boost-devel BuildRequires: gmp-devel BuildRequires: pkgconfig(jsoncpp) BuildRequires: pkgconfig(leveldb) BuildRequires: miniupnpc-devel #BuildRequires: cpuid BuildRequires: curl-devel BuildRequires: libmicrohttpd-devel BuildRequires: argtable2-devel BuildRequires: cmake %if %{evmjit} BuildRequires: llvm-devel >= 3.8 %endif BuildRequires: cryptopp-devel BuildRequires: opencl-devel BuildRequires: json-rpc-cpp-devel BuildRequires: catch-devel BuildRequires: libMesaGLU-devel %if "%{?distro_section}" == "nonfree" Recommends: x11-driver-video-fglrx Recommends: dkms-fglrx Recommends: fglrx-opencl Recommends: x11-driver-video-fglrx Recommends: fglrx-control-center %endif Requires: %{libscrypt} Requires: %{libname} Requires: %{develname} Requires: %{develscrypt} %if %{evmjit} Requires: %{libevmjit} Requires: %{develevmjit} %endif %description It is the third most popular of the Ethereum clients, behind geth (the go client) and Parity (the rust client). The code is exceptionally portable and has been used successfully on a very broad range of operating systems and hardware. We are in the process of re-licensing the codebase from the copyleft GPLv3 license to the permissive Apache 2.0 licence, to enable Ethereum to be used as broadly as possible. There is a long-form article - "Ethereum Everywhere" - which talks about the rationale for the change and the history leading up to this proposed change of licensing. %package -n %{libname} Summary: Main library for %{name} Group: System/Libraries %description -n %{libname} Shared libraries for %{name}. %package -n %{develname} Summary: Development files for %{name} Group: Development/C++ Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} Development files and headers for %{name}. %package -n %{libscrypt} Summary: Main library for %{name} and scrypt Group: System/Libraries %description -n %{libscrypt} Shared libraries for %{name} and scrypt. %package -n %{develscrypt} Summary: Development files for %{name} and scrypt Group: Development/C++ Requires: %{libscrypt} = %{version}-%{release} Provides: scrypt-devel = %{version}-%{release} %description -n %{develscrypt} Development files and headers for %{name} and scrypt. %if %{evmjit} %package -n %{libevmjit} Summary: Main library for %{name} and evm Group: System/Libraries %description -n %{libevmjit} Shared libraries for %{name} and evm. %package -n %{develevmjit} Summary: Development files for %{name} and evm Group: Development/C++ Requires: %{libevmjit} = %{version}-%{release} Provides: evmjit-devel = %{version}-%{release} %description -n %{develevmjit} Development files and headers for %{name} and evm. %endif %prep %setup -qn cpp-ethereum-develop pushd evmjit %patch0 -p1 popd %build %cmake \ -DTESTS=no \ %if %{evmjit} -DEVMJIT=on \ %endif -DLIBDIR=%{_libdir} %make_build %install %make_install -C build #mv %{buildroot}/%{_libdir}/%{name}/pkgconfig %{buildroot}/%{_libdir}/ %ifarch x86_64 amd64 mv %{buildroot}/usr/lib %{buildroot}/%{_libdir} %endif pushd %{buildroot}/%{_libdir} for l in `ls -1`; do mv $l $l.%{major} ln -s $l.%{major} $l done popd %if %{evmjit} pushd %{buildroot}/%{_includedir}/include mv * .. popd pushd %{buildroot}/%{_includedir} rm -rf include popd %endif %files %doc LICENSE README.md %{_bindir}/bench %{_bindir}/eth %{_bindir}/ethkey %{_bindir}/ethminer %{_bindir}/ethvm %{_bindir}/rlp %files -n %{libname} %{_libdir}/libdevcore.so.%{major} %{_libdir}/libdevcrypto.so.%{major} %{_libdir}/libethash-cl.so.%{major} %{_libdir}/libethashseal.so.%{major} %{_libdir}/libethash.so.%{major} %{_libdir}/libethcore.so.%{major} %{_libdir}/libethereum.so.%{major} %{_libdir}/libevmcore.so.%{major} %{_libdir}/libevm.so.%{major} %{_libdir}/libp2p.so.%{major} %{_libdir}/libweb3jsonrpc.so.%{major} %{_libdir}/libwebthree.so.%{major} %{_libdir}/libwhisper.so.%{major} %files -n %{develname} %{_libdir}/libdevcore.so %{_libdir}/libdevcrypto.so %{_libdir}/libethash-cl.so %{_libdir}/libethashseal.so %{_libdir}/libethash.so %{_libdir}/libethcore.so %{_libdir}/libethereum.so %{_libdir}/libevmcore.so %{_libdir}/libevm.so %{_libdir}/libp2p.so %{_libdir}/libweb3jsonrpc.so %{_libdir}/libwebthree.so %{_libdir}/libwhisper.so %files -n %{libscrypt} %{_libdir}/libscrypt.so.%{major} %files -n %{develscrypt} %{_includedir}/scrypt %{_libdir}/libscrypt.so %if %{evmjit} %files -n %{libevmjit} %{_libdir}/libevmjit.so.* %files -n %{develevmjit} %{_includedir}/evmjit/JIT.h %{_includedir}/evm.h %{_includedir}/evmjit.h %{_libdir}/libevmjit.so #{_libdir}/pkgconfig/%%{project_name}.pc %endif %changelog * Tue May 16 2017 neoclust <neoclust> 1.3.0-0.20160911.6.mga6 + Revision: 1102005 - Rebuild against new miniupnpc * Sat Jan 07 2017 daviddavid <daviddavid> 1.3.0-0.20160911.5.mga6.nonfree + Revision: 1080516 - rebuild for llvm 3.9.1 * Mon Jan 02 2017 akien <akien> 1.3.0-0.20160911.4.mga6.nonfree + Revision: 1079576 - Rebuild for libjsoncpp changed soname * Mon Sep 12 2016 dlucio <dlucio> 1.3.0-0.20160911.3.mga6.nonfree + Revision: 1051588 - identifies 64 bits instead others - it will require devel subpackages until I figure out a patch * Mon Sep 12 2016 dlucio <dlucio> 1.3.0-0.20160911.2.mga6.nonfree + Revision: 1051582 - amd64 and x86_64 - dont fix evm when we dont need it - no cpuid - libevemjit is only available in x86_64, only requires when x86_64 then - evmjit only for x86_64 -jit support - libevmjit subpackages * Sat Sep 10 2016 daviddavid <daviddavid> 1.3.0-0.20160902.2.mga6.nonfree + Revision: 1051371 - rebuild for missing rpms + dlucio <dlucio> - fglrx optional until it is finished * Sat Sep 03 2016 dlucio <dlucio> 1.3.0-0.20160902.mga6.nonfree + Revision: 1049864 - only rename when different than 32 bits - no x11-driver-video-fglrx as BR - imported package cpp-ethereum