File pachi-go.spec of Package pachi-go

#
# spec file for package pachi-go
#
# Copyright (c) 2021 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:           pachi-go
Version:        12.60
Release:        0
Summary:        Engine for the game of go/weiqi/baduk
License:        GPL-2.0-only
Group:          Amusements/Games/Board/Other
URL:            https://pachi.or.cz/
Source:         https://github.com/pasky/pachi/archive/pachi-%{version}.tar.gz
BuildRequires:  libboost_system-devel
BuildRequires:  caffe-devel
BuildRequires:  pkgconfig(gflags)
BuildRequires:  pkgconfig(libglog)
BuildRequires:  pkgconfig(protobuf)
BuildRequires:  openblas-devel
BuildRequires:  cblas-devel

%description
Pachi is a reasonably strong engine for the ancient game of go.

The default engine plays by Chinese rules and should be about 7d KGS
strength on 9x9. On 19x19 it can hold a solid KGS 2d rank on modest
hardware (Raspberry Pi 3, dcnn) or faster machine (e.g. six-way Intel
i7) without dcnn. When using a large cluster (64 machines, 20 cores each),
it maintains KGS 3d to 4d and has won e.g. a 7-stone handicap game against
Zhou Junxun 9p.

By default, Pachi currently uses the UCT engine that combines Monte Carlo
approach with tree search; UCB1AMAF tree policy using the RAVE method is
used for tree search, while the Moggy playout policy using 3×3 patterns
and various tactical checks is used for the semi-random Monte Carlo
playouts. Large-scale board patterns and dcnn are used in the tree
search.

%prep
%setup -q -n pachi-pachi-%{version}
mkdir .git
touch .git/HEAD .git/index

%build
%make_build DATADIR=%{_datadir}/%{name}

%install
make install install-data PREFIX=%{buildroot}%{_prefix} DATADIR=%{buildroot}%{_datadir}/%{name}
mv %{buildroot}%{_bindir}/pachi %{buildroot}%{_bindir}/%{name}
chmod -x %{buildroot}%{_datadir}/%{name}/*

%files
%license COPYING
%doc CREDITS HACKING README.md TODO
%{_bindir}/%{name}
%{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by