a0c2a96
%global weak    22
a0c2a96
34249fa
%global pre     RC2
a0c2a96
%global engine  dreamer
a336c12
a336c12
Name:           dreamchess
a336c12
Version:        0.2.1
b0c755c
Release:        17.%{pre}%{?dist}
a336c12
Summary:        Portable chess game
a336c12
##GPLv2+ and v3+ for most of sources, explicitly BSD for src/include/gamegui/queue.h (see file COPYRIGHT)
a336c12
License:        GPLv3+ and BSD
a336c12
URL:            http://www.%{name}.org/
e155d71
Source0:        https://github.com/%{name}/%{name}/releases/download/%{version}-%{pre}/%{name}-%{version}-%{pre}.tar.gz
a336c12
a336c12
BuildRequires:  mxml-devel
53f8b20
BuildRequires:  SDL-devel SDL_image-devel SDL_mixer-devel glew-devel
0e2128f
BuildRequires:  help2man desktop-file-utils
a336c12
e6decd0
# icons get installed into hicolor folders
e6decd0
Requires:       hicolor-icon-theme
e6decd0
a336c12
Requires:       chessprogram
a0c2a96
a0c2a96
%if 0%{?fedora} >= %{weak}
a0c2a96
Suggests:       %{name}-engine
9a65408
Suggests:       gnuchess
9a65408
%endif
a336c12
a336c12
Requires:       %{name}-data = %{version}-%{release}
a336c12
a336c12
%description
a336c12
DreamChess is an open source chess game.
a336c12
a336c12
Features:
a336c12
- 3D OpenGL graphics
a336c12
- various chess board sets: from classic wooden to flat figurines
a336c12
- music, sound effects
a336c12
- on-screen move lists using SAN notation
a336c12
- undo functionality
a336c12
- save-games in PGN format
a336c12
a336c12
A moderately strong chess engine as a sub-package: Dreamer.
a336c12
a336c12
a336c12
%package engine
a336c12
Summary:        A moderately strong chess engine for the game DreamChess
a336c12
License:        GPLv3+
a336c12
Provides:       chessprogram
a336c12
a0c2a96
%if 0%{?fedora} >= %{weak}
a0c2a96
Suggests:       %{name}
a0c2a96
%endif
a0c2a96
a336c12
%description engine
a336c12
Should this chess engine be too weak for you, then you can use any other
a336c12
XBoard-compatible chess engine, including the popular Crafty and GNU Chess.
a336c12
a336c12
a336c12
%package data
a336c12
Summary:        Data files for the game DreamChess
a336c12
BuildArch:      noarch
a336c12
Requires:       %{name} = %{version}-%{release}
a336c12
a336c12
%description data
a336c12
Data files for the game DreamChess:
a336c12
Boards, Pieces, Sounds, Styles, Themes.
a336c12
a336c12
a336c12
%prep
a336c12
%autosetup -n %{name}-%{version}-%{pre}
e6decd0
# ignore tree product
e6decd0
rm data/*.icns
a336c12
a336c12
%build
a336c12
%configure LIBS=-lm
a336c12
make %{?_smp_mflags}
0e2128f
# generate manpage
aaa9b13
help2man -o %{name}.man --no-discard-stderr --version-string='%{version}-%{pre}' src/%{name}
a336c12
a336c12
%install
a336c12
%make_install
53f8b20
mkdir -p %{buildroot}%{_datadir}/pixmaps
53f8b20
ln -s ../icons/hicolor/256x256/apps/dreamchess.png
0e2128f
mkdir -p %{buildroot}%{_mandir}/man1
0e2128f
gzip -c %{name}.man > %{buildroot}%{_mandir}/man1/%{name}.1.gz
e6decd0
e6decd0
e6decd0
%check
e6decd0
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
a336c12
a336c12
53f8b20
%post
53f8b20
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
53f8b20
53f8b20
%postun
53f8b20
if [ $1 -eq 0 ] ; then
53f8b20
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
53f8b20
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
53f8b20
fi
53f8b20
53f8b20
%posttrans
53f8b20
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
53f8b20
53f8b20
a336c12
%files
Raphael Groner 472871e
%license COPYING COPYRIGHT
Raphael Groner 472871e
%doc README NEWS AUTHORS
a336c12
%{_bindir}/%{name}
a336c12
%dir %{_datadir}/%{name}
a336c12
%{_datadir}/%{name}/font.*
a336c12
%{_datadir}/%{name}/menu_title.png
e6decd0
%{_datadir}/icons/hicolor/*/apps/%{name}.png
a336c12
%{_datadir}/applications/%{name}.desktop
a336c12
%{_mandir}/man6/%{name}.6.gz 
0e2128f
%{_mandir}/man1/%{name}.1*
a336c12
a336c12
%files engine
Raphael Groner 472871e
%license COPYING COPYRIGHT
Raphael Groner 472871e
%doc AUTHORS
a336c12
%{_bindir}/%{engine}
a336c12
%{_mandir}/man6/%{engine}.6.gz
a336c12
a336c12
%files data
Raphael Groner 472871e
%license COPYING COPYRIGHT
a336c12
%{_datadir}/%{name}/boards/
a336c12
%{_datadir}/%{name}/pieces/
a336c12
%{_datadir}/%{name}/sounds/
a336c12
%{_datadir}/%{name}/styles/
a336c12
%{_datadir}/%{name}/themes/
a336c12
a336c12
a336c12
%changelog
b0c755c
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-17.RC2
b0c755c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
b0c755c
c8515ab
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-16.RC2
c8515ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c8515ab
7af5af9
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-15.RC2
7af5af9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7af5af9
Orion Poplawski 5693fc3
* Tue Jan 10 2017 Orion Poplawski <orion@cora.nwra.com> - 0.2.1-14.RC2
Orion Poplawski 5693fc3
- Rebuild for glew 2.0.0
Orion Poplawski 5693fc3
6458a35
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-13.RC2
6458a35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6458a35
9b3044d
* Thu Jan 14 2016 Adam Jackson <ajax@redhat.com> - 0.2.1-12.RC2
9b3044d
- Rebuild for glew 1.13
9b3044d
e155d71
* Mon Aug 31 2015 Raphael Groner <projects.rg@smart.ms> - 0.2.1-11.RC2
e155d71
- upstream moved to GitHub
e155d71
57d9749
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-10.RC2
57d9749
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
57d9749
Raphael Groner 472871e
* Wed Jan 28 2015 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-9.RC2
Raphael Groner 472871e
- introduce license macro
Raphael Groner 472871e
0e2128f
* Sat Jan 03 2015 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-8.RC2
0e2128f
- add manpage
0e2128f
53f8b20
* Sat Dec 27 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-7.RC2
53f8b20
- add glew as dependency
53f8b20
- add icon cache scriptlets
53f8b20
34249fa
* Tue Dec 23 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-6.RC2
34249fa
- v0.2.1 RC2
e6decd0
- use proper download url
e6decd0
- honor icons & desktop file from make install
34249fa
a0c2a96
* Tue Oct 07 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-5.1.RC1
a0c2a96
- temporarily, disable weak dependencies due to unclear policy
a0c2a96
9a65408
* Mon Sep 29 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-5.RC1
9a65408
- use desktop file from source tarball
9a65408
- enable Suggests (rpm 4.12)
9a65408
a336c12
* Sun Sep 14 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-4.RC1
a336c12
- fix folder owner
a336c12
a336c12
* Sun Sep 14 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-3.RC1
a336c12
- fix Requires with right version
a336c12
- rename dreamer sub-package to just engine
a336c12
- licence of engine sub-package
a336c12
- spelling for rpmlint
a336c12
a336c12
* Sat Sep 13 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-2.RC1
a336c12
- dreamer engine provides chessprogram as a sub-package
a336c12
- description mentions features
a336c12
- manpages should not be in doc
a336c12
- general cleanup for review
a336c12
- proper licences
a336c12
- tag for pre-release
a336c12
a336c12
* Wed Sep 10 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-1
a336c12
- initial