Blob Blame History Raw
%global pre RC1
%global engine dreamer

Name:           dreamchess
Version:        0.2.1
Release:        4.%{pre}%{?dist}
Summary:        Portable chess game
##GPLv2+ and v3+ for most of sources, explicitly BSD for src/include/gamegui/queue.h (see file COPYRIGHT)
License:        GPLv3+ and BSD
URL:            http://www.%{name}.org/
Source0:        http://sf.net/projects/%{name}/files/%{name}/Git/%{name}-%{version}-%{pre}.tar.gz
Source1:        https://raw.githubusercontent.com/Arch-Games/arch-games/master/packages/%{name}/%{name}.desktop

BuildRequires:  mxml-devel
BuildRequires:  SDL-devel SDL_image-devel SDL_mixer-devel 
BuildRequires:  desktop-file-utils

##rpmbuild does not like Suggests tag
#Suggests:       %{name}-engine = %{version}-%{release}
Requires:       chessprogram

Requires:       %{name}-data = %{version}-%{release}

%description
DreamChess is an open source chess game.

Features:
- 3D OpenGL graphics
- various chess board sets: from classic wooden to flat figurines
- music, sound effects
- on-screen move lists using SAN notation
- undo functionality
- save-games in PGN format

A moderately strong chess engine as a sub-package: Dreamer.


%package engine
Summary:        A moderately strong chess engine for the game DreamChess
License:        GPLv3+
Provides:       chessprogram

%description engine
Should this chess engine be too weak for you, then you can use any other
XBoard-compatible chess engine, including the popular Crafty and GNU Chess.


%package data
Summary:        Data files for the game DreamChess
BuildArch:      noarch
Requires:       %{name} = %{version}-%{release}

%description data
Data files for the game DreamChess:
Boards, Pieces, Sounds, Styles, Themes.


%prep
%autosetup -n %{name}-%{version}-%{pre}


%build
%configure LIBS=-lm
make %{?_smp_mflags}


%install
%make_install
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}


%files
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/font.*
%{_datadir}/%{name}/icon.*
%{_datadir}/%{name}/menu_title.png

%{_datadir}/applications/%{name}.desktop
%{_mandir}/man6/%{name}.6.gz 
%doc README NEWS COPYING COPYRIGHT AUTHORS

%files engine
%{_bindir}/%{engine}
%{_mandir}/man6/%{engine}.6.gz
%doc COPYING COPYRIGHT AUTHORS

%files data
%{_datadir}/%{name}/boards/
%{_datadir}/%{name}/pieces/
%{_datadir}/%{name}/sounds/
%{_datadir}/%{name}/styles/
%{_datadir}/%{name}/themes/


%changelog
* Sun Sep 14 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-4.RC1
- fix folder owner

* Sun Sep 14 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-3.RC1
- fix Requires with right version
- rename dreamer sub-package to just engine
- licence of engine sub-package
- spelling for rpmlint

* Sat Sep 13 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-2.RC1
- dreamer engine provides chessprogram as a sub-package
- description mentions features
- manpages should not be in doc
- general cleanup for review
- proper licences
- tag for pre-release

* Wed Sep 10 2014 Raphael Groner <projects.rg [AT] smart.ms> - 0.2.1-1
- initial