File ethereum-cpp.spec of Package ethereum-cpp
#
# spec file for package ethereum-cpp
#
Name: ethereum-cpp
Version: 0
Release: 0
Summary: Ethereum C++ implementation
License: GPL-3.0
Url: http://www.ethereum.org
Source0: cpp-ethereum-%{version}.tar.xz
BuildRequires: ImageMagick
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: curl-devel
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gmp-devel
BuildRequires: libcpuid-devel
BuildRequires: libcryptopp-devel
BuildRequires: libjsoncpp-devel
BuildRequires: libjsonrpc-cpp-devel
BuildRequires: libleveldb-devel
BuildRequires: libmicrohttpd-devel
BuildRequires: libminiupnpc-devel
BuildRequires: libqt5-qtbase-devel
BuildRequires: libqt5-qtwebengine-devel
BuildRequires: update-desktop-files
%description
Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third party interference.
These apps run on a custom built blockchain, an enormously powerful shared global infrastructure that can move value around and represent the ownership of property. This enables developers to create markets, store registries of debts or promises, move funds in accordance with instructions given long in the past (like a will or a futures contract) and many other things that have not been invented yet, all without a middle man or counterparty risk.
%package -n libethereum
Summary: Ethereum C++ library
Group: System/Libraries
%description -n libethereum
Libraries for the Ethereum C++ implementation.
%package -n libethereum-devel
Summary: Development files for libethereum
Group: Development/Libraries/C and C++
Requires: libethereum = %{version}
%description -n libethereum-devel
The %{name}-devel package contains libraries and header files for developing applications that use libethereum.
%package doc
Summary: Documentation for %{name}
Group: Documentation/Man
BuildArch: noarch
%description doc
This package contains the documentation for %{name}.
%prep
%setup -q -n cpp-ethereum-%version
#%{_bindir}/convert alethzero/alethzero/alethzero.ico png32:alethzero.png
#%{_bindir}/convert mix/mix.ico png32:mix.png
%build
%cmake -DCMAKE_BUILD_TYPE=Release -DETH_STATIC=OFF -DTESTS=OFF -DETHASHCL=OFF
%{__make} %{?_smp_mflags}
cd ../doc
%{_bindir}/doxygen Doxyfile
%install
%cmake_install
%if "%{?_lib}" == "lib64"
%{__mv} %{buildroot}/usr/lib %{buildroot}%{_libdir}
%endif
# install desktop file
%{__install} -D -m 0644 alethzero-5.png %{buildroot}%{_datadir}/pixmaps/alethzero.png
%suse_update_desktop_file -c alethzero AlethZero AlethZero alethzero alethzero Office Finance
%{__install} -D -m 0644 mix.png %{buildroot}%{_datadir}/pixmaps/mix-ide.png
%suse_update_desktop_file -c mix-ide "Mix IDE" "Mix IDE" mix-ide mix-ide Office Finance
# install documentation
%{__install} -d -m 0755 %{buildroot}%{_defaultdocdir}/%{name}
%{__install} -m 0644 -p -t %{buildroot}%{_defaultdocdir}/%{name} CONTRIBUTING.md README.md
%{__cp} -a doc/html %{buildroot}%{_defaultdocdir}/%{name}/
%fdupes %{buildroot}%{_defaultdocdir}/%{name}
%post -n libethereum
/sbin/ldconfig
%postun -n libethereum
/sbin/ldconfig
%files
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/*
%{_datadir}/pixmaps/*.png
%{_datadir}/applications/*.desktop
%files -n libethereum
%defattr(-,root,root,-)
%{_libdir}/*.so
%files -n libethereum-devel
%defattr(-,root,root,-)
%dir %{_includedir}/*
%dir %{_includedir}/*/*
%{_includedir}/*/*.h
%{_includedir}/*/*/*.h
%files doc
%defattr(-,root,root,-)
%{_defaultdocdir}/%{name}/
%changelog