84f1e2c
%global pre     alpha
84f1e2c
84f1e2c
Name:           brutalchess
84f1e2c
Version:        0.5.2
3dc1a9f
Release:        0.5.%{pre}%{?dist}
84f1e2c
Summary:        Chess game with impressive 3D graphics
84f1e2c
84f1e2c
License:        GPLv2+
84f1e2c
URL:            http://sf.net/projects/%{name}
3dc1a9f
# we don't want the original fonts due to legal reasoning
3dc1a9f
# http://sf.net/projects/%{name}/files/%{name}-%{pre}/%{name}-%{pre}-%{version}/%{name}-%{pre}-%{version}-src.tar.gz
84f1e2c
Source0:        %{name}-%{pre}-%{version}-nofonts.tar.xz
84f1e2c
Source1:        %{name}-nofonts.sh
84f1e2c
84f1e2c
Patch0:         https://sf.net/p/%{name}/patches/8/attachment/%{name}-freetype2.patch
84f1e2c
# fonts: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584416
84f1e2c
Patch1:         https://sf.net/p/%{name}/patches/7/attachment/%{name}-fonts.diff
3dc1a9f
# quake pieces are not available, http://bugs.debian.org/732227
3dc1a9f
Patch2:         brutalchess-noquake.patch
84f1e2c
84f1e2c
# features later:
3dc1a9f
# FIXME crafty https://sf.net/p/brutalchess/patches/4/
3dc1a9f
# FIXME PGN https://sf.net/p/brutalchess/patches/3/
3dc1a9f
# FIXME -l option https://sf.net/p/brutalchess/patches/2/
84f1e2c
84f1e2c
Source10:       http://slackbuilds.org/slackbuilds/14.1/games/%{name}/%{name}.desktop
84f1e2c
Source11:       http://slackbuilds.org/slackbuilds/14.1/games/%{name}/%{name}.png
84f1e2c
Patch10:        http://slackbuilds.org/slackbuilds/14.1/games/%{name}/%{name}-%{version}-fix-FTBFS.patch
84f1e2c
Patch11:        http://slackbuilds.org/slackbuilds/14.1/games/%{name}/%{name}-%{version}-gcc4.3.patch
84f1e2c
Patch12:        http://slackbuilds.org/slackbuilds/14.1/games/%{name}/%{name}-%{version}-gcc4.7.patch
84f1e2c
84f1e2c
BuildRequires:  SDL-devel SDL_image-devel
3dc1a9f
BuildRequires:  mesa-libGL-devel
84f1e2c
BuildRequires:  freetype-devel
3dc1a9f
BuildRequires:  doxygen
84f1e2c
BuildRequires:  desktop-file-utils
84f1e2c
3dc1a9f
Requires:       gnu-free-sans-fonts
Rex Dieter b1c8079
Rex Dieter b1c8079
# -doc subpkg was < 100k, not worth splitting out (yet) -- rex
Rex Dieter b1c8079
Obsoletes: brutalchess-doc < 0.5.2-0.4
Rex Dieter b1c8079
Provides:  %{name}-doc = %{version}-%{release}
84f1e2c
84f1e2c
%description
3dc1a9f
BrutalChess features full 3D graphics, an advanced particle engine, 
84f1e2c
and several different levels of intelligent AI, inspired by the once 
84f1e2c
popular "Battle Chess" released by Interplay circa 1988.
84f1e2c
84f1e2c
84f1e2c
%prep
84f1e2c
%setup -q
84f1e2c
%patch0 -p0
84f1e2c
%patch1 -p1
3dc1a9f
%patch2 -p1
84f1e2c
%patch10
84f1e2c
%patch11
84f1e2c
%patch12 -p1
Rex Dieter b1c8079
# update Doxyfile
84f1e2c
doxygen -u
3dc1a9f
# proper font license
3dc1a9f
sed -i s,fonts,, Makefile.in
3dc1a9f
sed -i 's,\(fontsdir=\).*,\1"\${datadir}/fonts/",' configure
3dc1a9f
sed -i s,ZEROES__.TTF,gnu-free/FreeSans.ttf, src/gamecore.cpp
3dc1a9f
# W: wrong-file-end-of-line-encoding
3dc1a9f
sed -i 's/\r$//' NEWS README
84f1e2c
84f1e2c
84f1e2c
%build
3dc1a9f
%configure
84f1e2c
make %{?_smp_mflags}
Rex Dieter b1c8079
doxygen
84f1e2c
84f1e2c
84f1e2c
%install
84f1e2c
%make_install
84f1e2c
3dc1a9f
# misplaced content
Rex Dieter b1c8079
rm -rv %{buildroot}%{_datadir}/%{name}/doc
84f1e2c
3dc1a9f
# desktop
84f1e2c
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE10}
84f1e2c
install -d %{buildroot}%{_datadir}/pixmaps
84f1e2c
cp -p %{SOURCE11} %{buildroot}%{_datadir}/pixmaps
84f1e2c
84f1e2c
84f1e2c
%files
84f1e2c
%doc AUTHORS COPYING ChangeLog NEWS README
Rex Dieter b1c8079
%doc doc/html
3dc1a9f
%{_bindir}/*
3dc1a9f
%{_libexecdir}/*
3dc1a9f
%{_datadir}/applications/*
3dc1a9f
%{_datadir}/pixmaps/*
84f1e2c
%{_datadir}/%{name}/
84f1e2c
84f1e2c
84f1e2c
%changelog
3dc1a9f
* Mon Dec 29 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.5.2-0.5.alpha
3dc1a9f
- remove wrong and improve fonts logic
3dc1a9f
- general files section
3dc1a9f
- remove useless title macro
3dc1a9f
- add noquake patch
3dc1a9f
- preserve timestamps of doc files
3dc1a9f
- remove confusing with-x flag
3dc1a9f
Rex Dieter b1c8079
* Sun Dec 28 2014 Rex Dieter <rdieter@fedoraproject.org> - 0.5.2-0.4.alpha
Rex Dieter b1c8079
- drop -doc subpkg (too small, not worth it)
Rex Dieter b1c8079
- omit non-html doc generation
Rex Dieter b1c8079
- add deps for font pkgs used
Rex Dieter b1c8079
Rex Dieter d09c54d
* Mon Dec 15 2014 Rex Dieter <rdieter@fedoraproject.org> 0.5.2-0.3.alpha
Rex Dieter d09c54d
- fix Release: tag
Rex Dieter d09c54d
Rex Dieter cb8171b
* Fri Dec 12 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.5.2-3.alpha
Rex Dieter cb8171b
- fixes for review
Rex Dieter cb8171b
Rex Dieter cb8171b
* Thu Dec 11 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.5.2-2.alpha
84f1e2c
- fix broken BR for Xorg
84f1e2c
- remove subpackages
84f1e2c
- additional doc package
Rex Dieter cb8171b
Rex Dieter cb8171b
* Sat Oct 25 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.5.2-1.alpha
Rex Dieter cb8171b
- original by Timur Kristóf (rhbz #701812)
84f1e2c
- desktop stuff and gcc patches from Slackware
84f1e2c
- link freetype2 properly
84f1e2c
- replace fonts, patch adopted from Debian
84f1e2c
- macro title in description
84f1e2c
- enhance documentation with doxygen and latex