%global project Stockfish #global owner mcostalba %global owner official-stockfish # release betterly from latest commits to be fastest %global commit 1e6d21dbb6918a2d5f2f09730b0c30e3a4895d5c %global commitdate 20150228 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: stockfish Version: 6 Release: 4.%{commitdate}git%{shortcommit}%{?dist} Summary: Powerful open source chess engine License: GPLv3+ URL: http://stockfishchess.org/ Source0: https://github.com/%{owner}/%{project}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz Source1: https://raw.githubusercontent.com/official-%{name}/%{project}/master/AUTHORS#/%{name}-AUTHORS # steal some documentation from ubuntu Source2: https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/%{name}/vivid/download/head:/engineinterface.txt-20091204230329-yljoyxocuxhxg1ot-78/engine-interface.txt#/%{name}-interface.txt Source3: https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/%{name}/vivid/download/head:/%{name}.6-20091204230329-yljoyxocuxhxg1ot-76/%{name}.6 # polyglot support Source4: https://raw.githubusercontent.com/mpurland/%{name}/master/polyglot.ini#/%{name}-polyglot.ini # FIXME cmake, https://github.com/official-stockfish/Stockfish/issues/272 Source10: %{project}-CMakeLists.txt BuildRequires: cmake Suggests: polyglot-chess %description Stockfish is a free UCI chess engine derived from Glaurung 2.1. It is not a complete chess program, but requires some UCI compatible GUI (like XBoard with PolyGlot, 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 your GUI. %prep %setup -qn%{project}-%{commit} cp -p %{SOURCE1} AUTHORS cp -p %{SOURCE2} %{SOURCE3} . # use cmake with Fedora compiler flags rm src/Makefile cp -p %{SOURCE10} src/CMakeLists.txt # W: wrong-file-end-of-line-encoding sed -i 's,\r$,,' %{name}-interface.txt # polyglot of installed binary and disable log sed -e 's,\(EngineDir = \).*,\1%{_bindir},' \ -e 's,\(EngineCommand = \).*,\1%{name},' \ -e 's,\(LogFile = \).*,\1~/,' -e 's,\(LogFile = \).*,\1false,' \ %{SOURCE4} >polyglot.ini %build %cmake src CXXFLAGS="%{optflags} -std=c++11" make %{?_smp_mflags} %install mkdir -p %{buildroot}%{_bindir} install -m 755 -p %{name} %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/man/man6 cp -p %{name}.6 %{buildroot}%{_datadir}/man/man6 mkdir -p %{buildroot}%{_sysconfdir}/%{name} cp -p polyglot.ini %{buildroot}%{_sysconfdir}/%{name} %check # taken from official Makefile ./%{name} bench 16 1 1000 default time %files %license Copying.txt %doc AUTHORS %{name}-interface.txt Readme.md %{_datadir}/man/man*/%{name}* %{_bindir}/%{name} %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/polyglot.ini %changelog * Mon Mar 02 2015 Raphael Groner - 6-4.20150228git1e6d21d - fix Release dist extension - fix ownership of etc/ - add Suggests: polyglot-chess (rhbz#1197333) * Sun Mar 01 2015 Raphael Groner - 6-3.20150228git1e6d21d - implement cmake - harden gcc5 - latest commit from upstream * Sat Feb 28 2015 Raphael Groner - 6-2.20150226git8a2c413 - switch to official github sources (as mentioned at homepage) - provide polyglot support - disable debuginfo * Wed Feb 25 2015 Raphael Groner - 6-1.20150131gitb331768 - bump to version 6 and switch to commits * Tue Sep 10 2013 Dhiru Kholia - 4-2 - fixed prep section and book path, removed dos2unix call, confirm to FHS - preserve timestamps for resources, use ExclusiveArch, preserve debug symbols * Tue Sep 10 2013 Dhiru Kholia - 4-1 - initial version based on stockfish.spec from mageia