Blob Blame History Raw
%global pre     alpha

Name:           brutalchess
Version:        0.5.2
Release:        0.6.%{pre}%{?dist}
Summary:        Chess game with impressive 3D graphics

License:        GPLv2+
URL:  {name}
# we don't want the original fonts due to legal reasoning
Source0:        %{name}-%{pre}-%{version}-nofonts.tar.xz
Source1:        %{name}

# fonts:
# quake pieces are not available,
Patch2:         brutalchess-noquake.patch

# features later:
# FIXME crafty
# FIXME -l option


BuildRequires:  SDL-devel SDL_image-devel
BuildRequires:  mesa-libGL-devel
BuildRequires:  freetype-devel
BuildRequires:  doxygen
BuildRequires:  desktop-file-utils

Requires:       gnu-free-sans-fonts

# -doc subpkg was < 100k, not worth splitting out (yet) -- rex
Obsoletes: brutalchess-doc < 0.5.2-0.4
Provides:  %{name}-doc = %{version}-%{release}

BrutalChess features full 3D graphics, an advanced particle engine, 
and several different levels of intelligent AI, inspired by the once 
popular "Battle Chess" released by Interplay circa 1988.

%setup -q
%patch0 -p0
%patch1 -p1
%patch2 -p1
%patch12 -p1
# update Doxyfile
doxygen -u
# proper font license
sed -i s,fonts,,
sed -i 's,\(fontsdir=\).*,\1"\${datadir}/fonts/",' configure
sed -i s,ZEROES__.TTF,gnu-free/FreeSans.ttf, src/gamecore.cpp
# W: wrong-file-end-of-line-encoding
sed -i 's/\r$//' NEWS README

make %{?_smp_mflags}


# misplaced content
rm -rv %{buildroot}%{_datadir}/%{name}/doc

# desktop
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE10}
install -d %{buildroot}%{_datadir}/pixmaps
cp -p %{SOURCE11} %{buildroot}%{_datadir}/pixmaps

%license COPYING
%doc doc/html

* Wed Jan 28 2015 Raphael Groner <projects.rg [AT]> - 0.5.2-0.6.alpha
- introduce license macro

* Mon Dec 29 2014 Raphael Groner <projects.rg [AT]> - 0.5.2-0.5.alpha
- remove wrong and improve fonts logic
- general files section
- remove useless title macro
- add noquake patch
- preserve timestamps of doc files
- remove confusing with-x flag

* Sun Dec 28 2014 Rex Dieter <> - 0.5.2-0.4.alpha
- drop -doc subpkg (too small, not worth it)
- omit non-html doc generation
- add deps for font pkgs used

* Mon Dec 15 2014 Rex Dieter <> 0.5.2-0.3.alpha
- fix Release: tag

* Fri Dec 12 2014 Raphael Groner <projects.rg [AT]> - 0.5.2-3.alpha
- fixes for review

* Thu Dec 11 2014 Raphael Groner <projects.rg [AT]> - 0.5.2-2.alpha
- fix broken BR for Xorg
- remove subpackages
- additional doc package

* Sat Oct 25 2014 Raphael Groner <projects.rg [AT]> - 0.5.2-1.alpha
- original by Timur Kristóf (rhbz #701812)
- desktop stuff and gcc patches from Slackware
- link freetype2 properly
- replace fonts, patch adopted from Debian
- macro title in description
- enhance documentation with doxygen and latex