gnuchess/gnuchess.spec

133 lines
3.8 KiB
RPMSpec

#
# spec file for package gnuchess (Version 5.07)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
# norootforbuild
Name: gnuchess
BuildRequires: bison flex readline-devel
Url: http://www.gnu.org/software/chess/chess.html
License: GPL v2 or later
Group: Amusements/Games/Board/Chess
Provides: chess_backend
Provides: gchess
AutoReqProv: on
Version: 5.07
Release: 144
Summary: GNU Chess Program
Source: %{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
Patch0: gnuchess-nonstatic.diff
Patch1: gnuchess-getline.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A worthy chess opponent that runs in text mode. Find an X11 interface
in the xboard package.
Authors:
--------
Hans Eric Sandstrom <hes@log-sv.se>
Stuart Cracraft <cracraft@rice-chex.ai.mit.edu>
Mike McGann <mwm@hslrswi.hasler.ascom.ch>
Philippe Schnoebelen <phs@lifia.imag.fr>
Tim Mann <mann@src.dec.com>
%prep
%setup
%patch0
%patch1
%build
CFLAGS="$RPM_OPT_FLAGS"
./configure --prefix=%{_prefix} \
--mandir=%{_mandir} \
--datadir=%{_datadir}
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
%install
if [ -f %{SOURCE2} ] ; then
bzcat %{SOURCE2} >book.dat
else
sh %{SOURCE3} %{SOURCE1}
fi
rm -rf doc/CVS
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man6
cp %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man6
mkdir -p $RPM_BUILD_ROOT%{_datadir}/gnuchess
cp book.dat $RPM_BUILD_ROOT%{_datadir}/gnuchess
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_prefix}/bin/*
%{_mandir}/man*/*
%{_datadir}/gnuchess
%doc AUTHORS COPYING ChangeLog NEWS README TODO doc
%changelog
* Sun Jun 07 2009 ro@suse.de
- rename getline to my_getline to avoid conflict with function
from glibc
* Thu Nov 06 2008 ro@suse.de
- remove NoSource tag
* Fri Mar 30 2007 ro@suse.de
- added flex,bison to buildreq
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Apr 05 2005 mmj@suse.de
- Make gcc4 happy
* Thu Aug 26 2004 sbrabec@suse.cz
- Updated to version 5.07.
- Updated book to version 1.01.
* Sun Jan 11 2004 adrian@suse.de
- add %%defattr
* Thu Aug 07 2003 sbrabec@suse.cz
- Updated to version 5.06.
* Tue Feb 11 2003 sbrabec@suse.cz
- Updated to version 5.05.
- Adapt to new gnuchess packaging scheme.
- Added new build script genbook.sh to shrink source RPM.
* Tue Feb 04 2003 sbrabec@suse.cz
- Provide chess_backend.
* Mon Aug 06 2001 dan@suse.cz
- update to 5.02 version
* Tue May 08 2001 mfabian@suse.de
- bzip2 sources
* Tue May 02 2000 vinil@suse.cz
- prefix problem fixed
* Tue Apr 11 2000 vinil@suse.cz
- buildroot added
* Thu Jan 20 2000 ro@suse.de
- man to /usr/share/man
* Wed Oct 13 1999 ro@suse.de
- update to pl80
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.