File nanominer.spec of Package nanominer
#
# spec file for package nanominer
#
# Copyright (c) 2025 SUSE LLC
#
# 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: nanominer
Version: 3.10.0
Release: 0
Summary: Miner for nanopool
License: GPL-3.0-only AND MIT
Group: Productivity/Other
URL: https://nanopool.org/
ExclusiveArch: x86_64
Source0: %{name}-%{version}.tar.xz
Source1: %{name}-rpmlintrc
%define install_dir /opt/nanopool
%description
nanominer is a program product developed by nanopool to create structural cryptocurrency units on the framework of the Ethash, Etchash, KawPow, Octopus, Ubqhash, Cuckaroo30, RandomX and Verushash algorithms. The present version of nanominer was made to work with every cryptocurrency based on these algorithms, including Ethereum, Ravencoin, Ethereum Classic, Conflux, QuarkChain, Ubiq, Monero, Cortex, VerusCoin and many others. This version of nanominer runs on Windows or Linux with AMD or Nvidia graphics cards (with the exception of RandomX and Verushash algorithms which are supported only on CPU). Cuckaroo30 algorithm is only supported on AMD Radeon RX 570 16 GB GPU. Octopus algorithm is only supported on Nvidia GPUs for now.
%prep
%setup -q -c
%build
%install
%{__mkdir_p} %{buildroot}%{_bindir}
%{__mkdir_p} %{buildroot}%{install_dir}/%{name}
%{__cp} -a -t %{buildroot}%{install_dir}/%{name} %{_builddir}/%{name}-%{version}/*
%{__strip} -s %{buildroot}%{install_dir}/%{name}/%{name}
%{__strip} -s %{buildroot}%{install_dir}/%{name}/amdmemtweak
%{__rm} -fr %{buildroot}%{install_dir}/%{name}/helper_scripts
echo -e "#!/bin/sh\n\npdir=\"\${PWD}/\"\ncd %{install_dir}/%{name}\nif [ \"\${1:0:1}\" == \"-\" ]\nthen\n\tpdir=\"\"\nfi\n./%{name} \"\${pdir}\${1}\"" > %{buildroot}%{_bindir}/%{name}
%if 0%{?suse_version} && 0%{?suse_version} < 1600
export NO_BRP_CHECK_RPATH=true
%endif
%check
%files
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/%{name}
%dir %{install_dir}
%{install_dir}/%{name}
%doc README-en.html
%license licenses/[A-Z]*.txt licenses/[A-Z]*.pdf
%changelog