File berusky.spec of Package berusky

#
# spec file for package berusky
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright Vincent Petry <PVince81@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           berusky
BuildRequires:  SDL-devel
BuildRequires:  SDL_image-devel
BuildRequires:  gcc-c++
BuildRequires:  gtk2-devel
Summary:        Logic game based on an ancient puzzle named Sokoban
License:        GPL-3.0 and GPL-2.0
Group:          Amusements/Games/Logic
Version:        1.4
Release:        0
# Downloaded from http://anakreon.cz/download/berusky-1.4.tar.gz
# and http://anakreon.cz/download/berusky-data-1.4.tar.gz
# Repacked both as tar.bz2
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}-data-%{version}.tar.bz2
Source2:        %{name}.desktop
Source3:        %{name}.png
# Patch to remove references to _DATE_ and _TIME_ which might cause
# rebuilds when not needed
Patch0:         %{name}-remove-datetime.patch
# PATCH-FIX-UPSTREAM berusky-fix-level-macro.patch PVince81@opensuse.org -- Fixes LINUX macro typo that breaks level loading
Url:            http://anakreon.cz/en/Berusky.htm
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
BuildRequires:  fdupes
%if 0%{?suse_version} > 1320
Requires(post): user(games)
%endif

%description
Berusky is a free logic game, published under GNU Public License and it's based on an ancient puzzle named Sokoban.

An old idea of moving boxes in a maze has been expanded with new logic items such as explosives, stones, special gates and so on. In addition, up to five bugs can cooperate and be controlled by the player.

In order to leave each level (there's about 120 levels in the game) it is necessary to own five keys and also to have a free way to the exit.

Berusky was primarily aimed to MS-DOS 5.x but the new version was reworked and runs on Linux and Windows now. It uses SDL library for graphics backend.

The game has been quite successful and well adopted by Czech players. We noticed about 20.000 downloads and Berusky was published as a CD bundle in many Czech gamer magazines, for instance Level, Gamestar.

Players highly appreciate its playability, well designed levels, low hardware requiements and nice graphics. 

Authors:
--------
    Project leader and code: Martin Stransky
    Game idea and level design: Lubos Dolezal
    In game graphics: Jan Halfar
    Menu graphics and Berusky logo: Vaclav Hlobil
    English translations: Radek Biba
    Sound and Music: Martin Linda
    Testing: Ondrej Soucek 

%prep
%setup -q -a 1
%patch0 -p1

# Move data into datadir
mv %{name}-data-%{version}/* data/

# Fix docdir
sed -i -e "s|^beruskydocdir =.*$|beruskydocdir = @docdir@|" Makefile.in

%build
%configure --docdir=%{_docdir}/%{name}/

%install
make DESTDIR="%{buildroot}" install

install -D -d %{buildroot}%{_datadir}/applications/
install -D %{S:2} %{buildroot}%{_datadir}/applications/
install -D -d %{buildroot}%{_datadir}/pixmaps/
install -D %{S:3} %{buildroot}%{_datadir}/pixmaps/

# install data files
cd data
cp -R GameData Levels Graphics %{buildroot}%{_datadir}/%{name}/
install -D -d %{buildroot}%{_var}/games/%{name}/
install -D berusky.ini %{buildroot}%{_var}/games/%{name}/

install -m 644 COPYING %{buildroot}%{_docdir}/%{name}/COPYING-data
install -m 644 README %{buildroot}%{_docdir}/%{name}/README-data
cd ..

rm %{buildroot}%{_docdir}/%{name}/INSTALL

%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%endif

%fdupes %{buildroot}%{_datadir}/%{name}/

%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%dir %{_docdir}/%{name}/
%{_docdir}/%{name}/*
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/*
%attr(0775,root,games) %dir %{_var}/games/%{name}/
%attr(0664,root,games) %{_var}/games/%{name}/%{name}.ini
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by