Summary: A chess board interface for ICS and engines
Summary(ja): ICS (Internet Chess Servers) と思考エンジンに対応のチェスボード。
Name: eboard
Version: 1.1.1
Release: 1%{?_dist_release}
License: GPL
Group: Applications/Games
Source: http://prdownloads.sourceforge.net/eboard/eboard-%{version}.tar.bz2
Patch0: eboard-0.9.5jp.patch
Patch1: eboard-1.1.1-ntext.patch
URL: http://www.bergo.eng.br/eboard/
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gtk2-devel, libpng-devel
Vendor: Project Vine
Distribution: Vine Linux
Packager: IKEDA, inagaki, owa

%description
eboard is a GTK+ chess board interface for ICS (Internet
Chess Servers) and chess engines (GNU Chess, Crafty, etc.).
It also displays games in PGN (Portable Game Notation)
format.

%description -l ja
eboard は、ICS (Internet Chess Servers) や チェスエンジン (GNU Chess や Crafty
など)に対応した、GTK+ を使ったチェスボードのインターフェースです。ネットワーク
による人間同士の対戦や、コンピュータとの対戦を楽しむことができます。
PGN (Portable Game Notation) フォーマットのゲームを表示することもできます。

%prep
%setup -q
#patch -p1
%patch1 -p0 -b .ntext

%build
%configure --man-prefix=%{_mandir}
make

%install
rm -rf $RPM_BUILD_ROOT

make bindir=${RPM_BUILD_ROOT}%{_bindir} mandir=${RPM_BUILD_ROOT}%{_mandir} datadir=${RPM_BUILD_ROOT}%{_datadir}/eboard install

chmod 644 ${RPM_BUILD_ROOT}%{_mandir}/*/*
install gnupiece.xpm ${RPM_BUILD_ROOT}%{_datadir}/eboard/

# Desktop file
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/applications

pushd ${RPM_BUILD_ROOT}%{_datadir}/applications
cat << EOF > eboard.desktop
[Desktop Entry]
Name=eboard
Comment=A chess board interface
Comment[ja]=チェスボードのインタフェース
Exec=eboard
Icon=/usr/share/eboard/gnupiece.xpm
Type=Application
Categories=GNOME;Application;Game;
EOF
popd

desktop-file-install --delete-original --vendor= \
  --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
  ${RPM_BUILD_ROOT}%{_datadir}/applications/*

%post
update-desktop-database >& /dev/null ||:

%postun
update-desktop-database >& /dev/null ||:

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%doc ChangeLog COPYING INSTALL README TODO
%doc Documentation/Crafty.txt Documentation/FICS-Timeseal.txt
%doc Documentation/GNUChess4.txt Documentation/GNUChess5.txt
%doc Documentation/Scripts.txt Documentation/Sjeng.txt Documentation/Themes.txt
%{_bindir}/eboard
%{_bindir}/eboard-config
%{_bindir}/eboard-addtheme
%{_mandir}/man1/eboard-config.1*
%{_mandir}/man1/eboard-addtheme.1*
%{_mandir}/man6/eboard.6*
%{_datadir}/eboard/classic.png
%{_datadir}/eboard/ghouls.png
%{_datadir}/eboard/plastic.png
%{_datadir}/eboard/eboard_themes.conf
%{_datadir}/eboard/NAG.en.txt
%{_datadir}/eboard/eboard.*.dict
%{_datadir}/eboard/gnupiece.xpm
%{_datadir}/applications/eboard.desktop

%changelog
* Sun May 16 2010 Shu KONNO <owa@bg.wakwak.com> 1.1.1-1
- updated eboard to 1.1.1
- added eboard-1.1.1-ntext.patch
- added %%post, %%postun section
- rebuilt with new environment

* Sat Aug 30 2008 Shu KONNO <owa@bg.wakwak.com> 1.0.4-1vl5
- applied new versioning policy, spec in utf-8
- reverted script to make eboard.desktop

* Sat Aug 25 2007 Shu KONNO <owa@bg.wakwak.com> 1.0.4-0vl2
- changed euic-jp string to utf-8 codes in script eboard.desktop

* Sun May 27 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.4-0vl1
- new upstream release
- updated URL

* Mon Sep 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.9.5-1vl4
- changed Group to Applications/Games

* Sun Aug 15 2004 IKEDA Katsumi <ikeda@webmasters.gr.jp> 0.9.5-1vl3
- Added BuildRequires.
- Modified Requires (libstdc++3).
- Modified the install way of eboard.desktop.
- Rebuild for Vine Linux 3.0

* Fri Jul 23 2004 IKEDA Katsumi <ikeda@webmasters.gr.jp> 0.9.5-1vl2
- Removed duplicated configure.
- Modified %%install and %%files.

* Fri Feb 13 2004 by IKEDA Katsumi  <ikeda@webmasters.gr.jp>
- 0.9.5-1vl1
- Modified Group, Source, Buildroot, %build, %install and %files.
- Add Patch, %Summary(ja) and %description -l ja.
- Remove %define ver, rel and prefix.

* Fri May 25 2001 Felipe Bergo <bergo@seul.org>
- built from the gPS spec