File xmr-stak-cpu.spec of Package xmr-stak-cpu

#
# spec file for package xmr-stak-cpu
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


%define         uver 1.2.0
Name:           xmr-stak-cpu
Version:        1.4.1
Release:        0
Summary:        Monero CPU miner
License:        GPL-2.0
Group:          Productivity/Other
Url:            https://github.com/fireice-uk/xmr-stak-cpu
Source0:        https://github.com/fireice-uk/xmr-stak-cpu/archive/v%{uver}-%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  cmake
%if 0%{?suse_version} > 1320
BuildRequires:  gcc
BuildRequires:  gcc-c++
%else
BuildRequires:  gcc6
BuildRequires:  gcc6-c++
%endif
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libmicrohttpd)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(zlib)
Exclusivearch:  x86_64

%description
XMR-Stak is a universal Stratum pool miner.

%prep
%setup -q -n %{name}-%{uver}-%{version}

%build
%if 0%{?suse_version} <= 1320
export CC=gcc-6
export CXX=g++-6
%endif
%cmake
%make_jobs

%install
%cmake_install
rm %{buildroot}%{_bindir}/config.txt
install -Dpm 0644 config.txt \
  %{buildroot}%{_sysconfdir}/%{name}/config.txt

%files
%defattr(-,root,root,-)
%doc LICENSE README.md
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/config.txt
%{_bindir}/xmr-stak-cpu

%changelog