Summary: The GNU chess program.
Summary(ja): GNU チェスゲーム
Name: gnuchess
Version: 6.1.2
Release: 2%{?_dist_release}

License: GPLv3+
Group: Applications/Games
URL: ftp://ftp.gnu.org/pub/gnu/chess/

Source: http://ftp.gnu.org/pub/gnu/chess/%{name}-%{version}.tar.gz
#Source1: http://ftp.gnu.org/pub/gnu/chess/book_1.02.pgn.gz
# use precompiled book.dat:
Source1: book_1.02.dat.gz

Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: ncurses-devel
BuildRequires: readline-devel
BuildRequires: flex
Provides: chessprogram

Distribution: Vine Linux
Vendor: Project Vine
Packager: inagaki, owa


%description
The gnuchess package contains the GNU chess program.  By default,
GNUchess uses a curses text-based interface.  Alternatively, GNUchess
can be used in conjunction with the xboard user interface and the X
Window System for a graphical chessboard.

Install the gnuchess package if you would like to play chess on your
computer.  If you'd like to use a graphical interface with GNUchess, 
you'll also need to install the xboard package and the X Window System.

%description -l ja 
GNUチェスプログラムを含むパッケージです。デフォルトはテキストベースで
すが、グラフィックチェス用のxboardインターフェイスと組み合わせることに
より、グラフィカルに楽しめます。

コンピュータ上でチェスを楽しみたいのであればこのパッケージをインストー
ルしましょう。ただし、グラフィカルに楽しみたいのであれば、xboardとX
Window System をあらかじめインストールしておいてください。


%prep
%setup -q -n %{name}-%{version}
gzip -dc %{SOURCE1} > book.dat

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/var/lib/games/gnuchess $RPM_BUILD_ROOT%{_bindir}
install -m 755 src/gnuchess $RPM_BUILD_ROOT%{_bindir}
install -m 644 book.dat $RPM_BUILD_ROOT%{_var}/lib/games/gnuchess
#Add gnuchess.ini, BZ 1075958
mkdir -p $RPM_BUILD_ROOT%{_datadir}/gnuchess/
install -m 644 src/gnuchess.ini $RPM_BUILD_ROOT%{_datadir}/gnuchess/

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc doc/* COPYING AUTHORS NEWS TODO README
%attr(2755,root,games) %{_bindir}/%{name}
%{_datadir}/gnuchess/gnuchess.ini
%dir %{_var}/lib/games/%{name}
%attr(664,root,games) %{_var}/lib/games/%{name}/book.dat

%changelog
* Thu Apr  2 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 6.1.2-2
- rebuilt with readline 6.3

* Tue Nov  4 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 6.1.2-1
- updated to 6.1.2

* Tue Apr 19 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 5.07-4
- add missing BuildRequires: flex

* Sat Apr 16 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.07-3
- added Distribution and Vendor tag
- rebuilt with current VineSeed

* Sun May 16 2010 Shu KONNO <owa@bg.wakwak.com> - 5.07-2
- added gnuchess-5.07-getline.patch
- rebuilt with new environment

* Sun Nov 23 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.07-1vl5
- applied new versioning policy
- spec in UTF-8

* Tue Jan 29 2008 Shu KONNO <owa@bg.wakwak.com> - 5.07-0vl1
- updated gnuchess to 5.07
- added gnuchess-5.07-common.patch

* Mon Sep 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.06-2vl2
- rebuilt with new toolchains
- changed Group to Applications/Games

* Thu Aug 14 2003 Susumu Tanimura  <stanimura-ngs@umin.ac.jp>
- Japanized this spec file.

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Mon May 05 2003 Karsten Hopp <karsten@redhat.de> 5.06-1
- update
- precompile book.dat

* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt

* Tue Nov 19 2002 Tim Powers <timp@redhat.com>
- rebuild for all arches

* Sat Jul 27 2002 Karsten Hopp <karsten@redhat.de>
- compress SRPM with bzip2 to save some space

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 30 2002 Karsten Hopp <karsten@redhat.de>
- remove obsolete Obsoletes: gnuchess

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Fri Jan 25 2002 Karsten Hopp <karsten@redhat.de>
- Fix buffer overflow

* Wed Jan 23 2002 Karsten Hopp <karsten@redhat.de> (5.02-4)
- remove ExcludeArch Alpha

* Wed Dec 19 2001 Karsten Hopp <karsten@redhat.de> 5.02-2
- fix #57687  (book.dat not writable)

* Wed Nov 28 2001 Karsten Hopp <karsten@redhat.de>
- Update gnuchess to 5.02
- added URL (#54612)
- ExcludeArch alpha until the compiler is fixed

* Wed Jul 07 2001 Karsten Hopp <karsten@redhat.de>
- dir /usr/lib/games/gnuchess owned by this package

* Sat Jul 07 2001 Karsten Hopp <karsten@redhat.de>
- add BuildRequires  (#45026)

* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Fri Jun 10 2000 Bill Nottingham <notting@redhat.com>
- rebuid in new environment

* Mon Apr  3 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- Rebuild with new ncurses
- do NOT update to 5.00 because it sucks: The UI is gone, the print
  tools are gone, and the Makefile contains DOS-specific instructions.

* Thu Feb  3 2000 Bill Nottingham <notting@redhat.com>
- handle compressed man pages

* Sat Aug 14 1999 Bill Nottingham <notting@redhat.com>
- provide chessprogram, don't require xboard

* Fri Jul 29 1999 Bill Nottingham <notting@redhat.com>
- update to 4.0pl80

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 3)

* Mon Jan 23 1999 Michael Maher <mike@redhat.com>
- changed group name

* Thu Dec 17 1998 Michael Maher <mike@redhat.com>
- rebuilt for 6.0, cleaned up spec file.

* Fri May 01 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Wed Apr 15 1998 Erik Troan <ewt@redhat.com>
- built against new ncurses

* Fri Oct 17 1997 Donnie Barnes <djb@redhat.com>
- BuildRoot'ed

* Thu Jul 10 1997 Erik Troan <ewt@redhat.com>
- built against glibc
