File stealthcoin.spec of Package stealthcoin

#
# spec file for package stealthcoin
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           stealthcoin
Version:        3.2.1.6
Release:        0
Summary:        P2P digital currency
License:        MIT
Group:          Productivity/Networking/Other
URL:            https://www.stealth-coin.com/
Source0:        %{name}-%{version}.tar.xz
Patch0:         %{name}-scripts.patch
ExclusiveArch:  x86_64
BuildRequires:  cmake
BuildRequires:  gcc12-c++
%if 0%{?suse_version} && 0%{?suse_version} > 1500
BuildRequires:  libboost_atomic-devel >= 1.72
BuildRequires:  libboost_filesystem-devel >= 1.72
BuildRequires:  libboost_program_options-devel >= 1.72
BuildRequires:  libboost_system-devel >= 1.72
BuildRequires:  libboost_thread-devel >= 1.72
%else
BuildRequires:  libboost_atomic1_74_0-devel >= 1.72
BuildRequires:  libboost_filesystem1_74_0-devel >= 1.72
BuildRequires:  libboost_program_options1_74_0-devel >= 1.72
BuildRequires:  libboost_system1_74_0-devel >= 1.72
BuildRequires:  libboost_thread1_74_0-devel >= 1.72
%endif
BuildRequires:  libcryptopp-devel >= 8.0
BuildRequires:  libdb-4_8-devel
BuildRequires:  libevent-devel >= 2.0
BuildRequires:  libopenssl-devel >= 3.0

%define bootstrap_name download-stealth-bootstrap
%define daemon_name %{name}d

%define description_text StealthCoin provides a complete anonymity solution for cryptocurrencies. It combines the network analysis resistance of Tor with the blockchain analysis resistance of stealth send. StealthCoin has a fair distribution with nearly four hours of low reward blocks, a small premine of 1%, and the long-term energy efficiency of proof-of-stake minting.

%description
%{description_text}

%package -n %{daemon_name}
Summary:        Headless daemon for %{name} crypto-currency
Group:          Productivity/Networking/Other

%description -n %{daemon_name}
%{description_text}

This package provides %{daemon_name}, a headless %{name} daemon.

%prep
%setup -q
%patch -P 0

%build
export CC=gcc-12 CXX=g++-12
%cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release ..
%cmake_build
%{__strip} -s %{_builddir}/%{name}-%{version}/build/StealthCoind

%install
%cmake_install
%{__mv} %{buildroot}%{_bindir}/StealthCoind %{buildroot}%{_bindir}/%{daemon_name}

%check

%files -n %{daemon_name}
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/%{daemon_name}
%attr(755,root,root) %{_bindir}/%{bootstrap_name}
%doc README

%changelog
openSUSE Build Service is sponsored by