Summary: The GNU chess program Name: gnuchess Version: 6.0.1 Release: 1 License: GPLv2+ Group: Amusements/Games URL: ftp://ftp.gnu.org/pub/gnu/chess/ Source0: ftp://ftp.gnu.org/pub/gnu/chess/%{name}-%{version}.tar.gz Source1: ftp://ftp.gnu.org/pub/gnu/chess/%{name}-%{version}.tar.gz.sig # use precompiled book.dat, this is how to generate it: # gzip -dc book_1.02.pgn.gz > book.pgn # gnuchessx # book add book.pgn # quit # mv book.dat book_1.02.dat # gzip -9 book_1.02.dat Source2: book_1.02.dat.gz Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Provides: chessprogram BuildRequires: readline-devel >= 5.2-3 BuildRequires: flex, patch Requires: readline >= 5.2-3 %description The gnuchess package contains the GNU chess program. By default, GNU chess uses a curses text-based interface. Alternatively, GNU chess can be used in conjunction with the xboard user interface and the X Window System for play using a graphical chess board. Install the gnuchess package if you would like to play chess on your computer. If you'd like to use a graphical interface with GNU chess, you'll also need to install the xboard package and the X Window System. %prep %setup -q export PATH=/opt/freeware/bin:$PATH %patch0 mkdir book gzip -dc %{SOURCE2} > book/book.dat %build export CC="cc -qcpluscmt" ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : gzip --best ${RPM_BUILD_ROOT}%{_infodir}/*info* rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name} cp book/book.dat ${RPM_BUILD_ROOT}%{_datadir}/%{name}/ chmod 0644 ${RPM_BUILD_ROOT}%{_datadir}/%{name}/* # prevent the introduction of a dependency on ruby chmod -x doc/quotes.rb cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %post /sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || : %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc doc/* COPYING AUTHORS NEWS TODO %{_bindir}/* %dir %{_datadir}/%{name} %{_datadir}/%{name}/* %{_infodir}/*info* /usr/bin/* %changelog * Tue Nov 29 2011 Michael Perzl - 6.0.1-1 - updated to version 6.0.1 * Tue Nov 29 2011 Michael Perzl - 6.0.0-1 - updated to version 6.0.0 * Thu Jan 27 2011 Michael Perzl - 5.08-2 - updated precompiled book from version 1.01 to 1.02 * Thu Jan 27 2011 Michael Perzl - 5.08-1 - first version for AIX V5.1 and higher