File katago.spec of Package katago

#
# spec file for package katago
#
# Copyright (c) 2020 timuzhti@gmail.com
#
# 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:           katago
Version:        0
Release:        0
Summary:        Strong open source go engine
License:        MIT
URL:            https://github.com/lightvector/KataGo
Source:         %{name}-%{version}.tar
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  git
BuildRequires:  gperftools-devel
BuildRequires:  ocl-icd-devel
%if 0%{?suse_version}
BuildRequires:  opencl-cpp-headers
%else
BuildRequires:  opencl-headers
%endif
BuildRequires:  libzip-devel
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig(libcrypto)

%description
A strong open source AI for the boardgame "go"

%prep
%autosetup

%build
cd cpp
%cmake . -DBUILD_DISTRIBUTED=1 -DUSE_BACKEND=OPENCL -DUSE_TCMALLOC=1 -DUSE_AVX2=1
%cmake_build

%install
find . -type f -name katago -exec \
        install -D {} %{buildroot}%{_bindir}/katago \;

%files
%if 0%{?suse_version} < 1500
%doc LICENSE
%else
%license LICENSE
%endif
%doc README.md

%{_bindir}/katago

%changelog
openSUSE Build Service is sponsored by