gnuchess/gnuchess.spec

85 lines
2.4 KiB
RPMSpec
Raw Normal View History

#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: gnuchess
Version: 5.07.94.1b
Release: 1
License: GPLv2+
Summary: GNU Chess Program (enhanced version)
Url: http://alpha.uhasselt.be/Research/Algebra/Toga/gnuchess-release/
Group: Amusements/Games/Board/Chess
Source0: %{name}-%{version}.tar.bz2
# WARNING: Don't forget to re-generate book.dat manually before submit!
# Simply remove the source and build, updated book will be generated.
Source1: book_1.01.pgn.bz2
Source2: book.dat.bz2
Source3: genbook.sh
Source4: gnuchess.6
Source5: xgnuchess
Patch0: gnuchess-nonstatic.diff
Patch1: gnuchess-no-return-in-nonvoid-function.diff
Patch2: gnuchess-missing-includes_implicit-fortify-decl.diff
Patch3: gnuchess-add_new_bookpath.diff
Patch4: gnuchess-getline.diff
Patch5: gnuchess-fix-missing-fclose.diff
BuildRequires: bison
BuildRequires: flex
BuildRequires: readline-devel
Provides: chess_backend
Provides: gchess
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A worthy chess opponent that runs in text mode. Find an X11 interface
in the xboard package.
This version includes some enhancements be Michel Vandenbergh, it is not an official release
from the GNU project.
Development on the official version seems to have stalled for several years now and this version also contains a few bug fixes.
See http://alpha.uhasselt.be/Research/Algebra/Toga/ for more information.
%prep
%setup -q
%patch0 -p0
%patch1 -p0
%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p0
%build
export CFLAGS="%{optflags} -pthread"
%configure
sed '/\/usr\/lib\/games\/gnuchess\/book\.dat/d;s:/usr/share/games:%{_datadir}:' <src/book.h >src/book.h~
mv src/book.h~ src/book.h
make CFLAGS="%{optflags} -pthread"
%install
if [ -f %{SOURCE2} ] ; then
bzcat %{SOURCE2} >book.dat
else
sh %{SOURCE3} %{SOURCE1}
fi
rm -rf doc/CVS
%make_install
mkdir -p %{buildroot}%{_mandir}/man6
cp %{SOURCE4} %{buildroot}%{_mandir}/man6
mkdir -p %{buildroot}%{_datadir}/gnuchess
cp book.dat %{buildroot}%{_datadir}/gnuchess
# install xgnuchess
install -m 755 %{SOURCE5} %{buildroot}/%{_bindir}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO doc
%{_bindir}/*
%{_mandir}/man*/*
%{_datadir}/gnuchess
%changelog