File stockfish_i586.spec of Package stockfish
#
# spec file for package stockfish
#
# Copyright (c) 2022 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/
#
%define nnuenet nn-5af11540bbfe.nnue
Name: stockfish
Version: 15
Release: 0
Summary: UCI chess engine
License: GPL-3.0-or-later
URL: https://stockfishchess.org
Source0: %{name}-%{version}.tar.xz
Source1: https://tests.stockfishchess.org/api/nn/%{nnuenet}
#Patch0: date.patch
BuildRequires: gcc-c++
BuildRequires: curl
ExclusiveArch: i586
%description
Stockfish is a free, powerful UCI chess engine derived from Glaurung 2.1.
Stockfish is not a complete chess program and requires a UCI-compatible graphical
user interface (GUI) (e.g. XBoard with PolyGlot, Scid, Cute Chess, eboard, Arena,
Sigma Chess, Shredder, Chess Partner or Fritz) in order to be used comfortably.
Read the documentation for your GUI of choice for information about how to use
Stockfish with it.
%package -n stockfish-sse41-popcnt
Summary: UCI chess engine
%description -n stockfish-sse41-popcnt
Stockfish is a free, powerful UCI chess engine derived from Glaurung 2.1.
Stockfish is not a complete chess program and requires a UCI-compatible graphical
user interface (GUI) (e.g. XBoard with PolyGlot, Scid, Cute Chess, eboard, Arena,
Sigma Chess, Shredder, Chess Partner or Fritz) in order to be used comfortably.
Read the documentation for your GUI of choice for information about how to use
Stockfish with it.
%package -n stockfish-general
Summary: UCI chess engine
%description -n stockfish-general
Stockfish is a free, powerful UCI chess engine derived from Glaurung 2.1.
Stockfish is not a complete chess program and requires a UCI-compatible graphical
user interface (GUI) (e.g. XBoard with PolyGlot, Scid, Cute Chess, eboard, Arena,
Sigma Chess, Shredder, Chess Partner or Fritz) in order to be used comfortably.
Read the documentation for your GUI of choice for information about how to use
Stockfish with it.
%package -n stockfish-sse2
Summary: UCI chess engine
%description -n stockfish-sse2
Stockfish is a free, powerful UCI chess engine derived from Glaurung 2.1.
Stockfish is not a complete chess program and requires a UCI-compatible graphical
user interface (GUI) (e.g. XBoard with PolyGlot, Scid, Cute Chess, eboard, Arena,
Sigma Chess, Shredder, Chess Partner or Fritz) in order to be used comfortably.
Read the documentation for your GUI of choice for information about how to use
Stockfish with it.
%prep
%autosetup -p1
cp %{SOURCE1} src/
%build
cd src/
make %{?_smp_mflags} profile-build ARCH=x86-32-sse41-popcnt
mv stockfish stockfish-sse41-popcnt
make clean
make %{?_smp_mflags} profile-build ARCH=x86-32-sse2
mv stockfish stockfish-sse2
make clean
make %{?_smp_mflags} profile-build ARCH=general-32
mv stockfish stockfish-general
make clean
make %{?_smp_mflags} profile-build ARCH=x86-32
%install
mkdir -p %{buildroot}%{_bindir}
install -m 755 -p src/%{name}-sse41-popcnt %{buildroot}%{_bindir}
install -m 755 -p src/%{name}-sse2 %{buildroot}%{_bindir}
install -m 755 -p src/%{name}-general %{buildroot}%{_bindir}
install -m 755 -p src/%{name} %{buildroot}%{_bindir}
%files
%license Copying.txt
%doc AUTHORS README.md
%{_bindir}/%{name}
%files -n stockfish-sse41-popcnt
%license Copying.txt
%doc AUTHORS README.md
%{_bindir}/%{name}-sse41-popcnt
%files -n stockfish-general
%license Copying.txt
%doc AUTHORS README.md
%{_bindir}/%{name}-general
%files -n stockfish-sse2
%license Copying.txt
%doc AUTHORS README.md
%{_bindir}/%{name}-sse2
%changelog