84f1e2c
%global pre     alpha
84f1e2c
84f1e2c
Name:           brutalchess
84f1e2c
Version:        0.5.2
a848a79
Release:        0.28.%{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
84f1e2c
Raphael Groner 3d4968c
# PGN resembling console output, http://sourceforge.net/p/brutalchess/patches/3
Raphael Groner 3d4968c
Patch2:         http://sf.net/p/%{name}/patches/_discuss/thread/96f1a752/0dc4/attachment/pgn-moveprint.diff
Raphael Groner 3d4968c
# Fix -l option, http://sourceforge.net/p/brutalchess/patches/2
Raphael Groner 3d4968c
Patch3:         http://sf.net/p/%{name}/patches/_discuss/thread/b91b1843/e6b7/attachment/fix-player2opt.diff
84f1e2c
Raphael Groner 3d4968c
# FIXME crafty, https://sf.net/p/brutalchess/patches/4
Raphael Groner 3d4968c
# patch can't be applied cause of any potential security risk, there is currently no crafty package in Fedora
Raphael Groner 3d4968c
Raphael Groner 3d4968c
# extensions from slack to let the package actually be usable and build
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
Raphael Groner 3d4968c
# disable feature: quake pieces are not available, http://bugs.debian.org/732227
Raphael Groner 3d4968c
Patch20:        brutalchess-noquake.patch
Raphael Groner 3d4968c
47c3858
BuildRequires:  gcc-c++
84f1e2c
BuildRequires:  SDL-devel SDL_image-devel
18e2294
BuildRequires:  mesa-libEGL-devel
84f1e2c
BuildRequires:  freetype-devel
3dc1a9f
BuildRequires:  doxygen
84f1e2c
BuildRequires:  desktop-file-utils
9eda5a0
BuildRequires: make
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
Raphael Groner 3d4968c
%patch3 -p1
84f1e2c
%patch10
84f1e2c
%patch11
84f1e2c
%patch12 -p1
Raphael Groner 3d4968c
%patch20 -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
4b2a506
%license COPYING
4b2a506
%doc AUTHORS 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
a848a79
* Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.28.alpha
a848a79
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
a848a79
5401a0c
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.27.alpha
5401a0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
5401a0c
61b544c
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.26.alpha
61b544c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
61b544c
87ada78
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.25.alpha
87ada78
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
87ada78
76fa4fd
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.24.alpha
76fa4fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
76fa4fd
ecc200b
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.23.alpha
ecc200b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
ecc200b
9205e3f
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.22.alpha
9205e3f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
9205e3f
1a8fd36
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.21.alpha
1a8fd36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
1a8fd36
083464b
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.20.alpha
083464b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
083464b
fce2931
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.19.alpha
fce2931
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
fce2931
558c259
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.18.alpha
558c259
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
558c259
8c7238f
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.17.alpha
8c7238f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
8c7238f
18e2294
* Sat Dec 08 2018 Raphael Groner <projects.rg@smart.ms> - 0.5.2-0.16.alpha
18e2294
- mesa header moved to another subpackage, rhbz#1551313
18e2294
2ec29c3
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.15.alpha
2ec29c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2ec29c3
fc55560
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.14.alpha
fc55560
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
fc55560
0130d65
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.13.alpha
0130d65
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
0130d65
4a6d028
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.12.alpha
4a6d028
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4a6d028
735fd6c
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.11.alpha
735fd6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
735fd6c
28ee889
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-0.10.alpha
28ee889
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
28ee889
dcc0dfb
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-0.9.alpha
dcc0dfb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
dcc0dfb
40ff24f
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.5.2-0.8.alpha
40ff24f
- Rebuilt for GCC 5 C++11 ABI change
40ff24f
Raphael Groner 3d4968c
* Mon Feb 09 2015 Raphael Groner <projects.rg (AT) smart.ms> - 0.5.2-0.7.alpha
Raphael Groner 3d4968c
- apply patches from upstream tracker: PGN, -l option
Raphael Groner 3d4968c
ab836bd
* Wed Jan 28 2015 Raphael Groner <projects.rg [AT] smart.ms> - 0.5.2-0.6.alpha
4b2a506
- introduce license macro
4b2a506
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