File affenspiel.spec of Package affenspiel

#
# spec file for package affenspiel
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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:           affenspiel
Version:        1.0
Release:        0
Summary:        Little puzzle game with monkey for X Window System
License:        SUSE-Freeware
Group:          Amusements/Games/Logic
Url:            http://www.artsoft.org/affenspiel/
Source0:        http://www.artsoft.org/RELEASES/unix/%{name}/%{name}-%{version}.tar.gz
Source1:        %{name}-icons.tar
Source2:        %{name}.desktop
%if 0%{?suse_version}
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
%endif
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xt)

%description
Shift the puzzle pieces around so that the monkey becomes complete,
that means, move the big piece through the other pieces to the
bottom of the playfield, so that the monkey picture gets complete.

This is a one-night hack. It's a puzzle type game for X11.
I played it on another hardware platform (it was made of several
pieces of wood) and ported it to Unix/X11.

%prep
%setup -q -b 1 -n %{name}

%build
make %{?_smp_mflags} FILE_CONFIG=-DSAVED_GAME_NAME='\"affenspiel.saved\"'

%install
# install executable
install -Dm 0755 %{name} %{buildroot}%{_bindir}/%{name}

# install icons
for i in 32 48 64 72 96 ; do
    install -Dm 0644 ../icons/%{name}_${i}x${i}.png \
            %{buildroot}/%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
done

# install Desktop file
install -Dm 0644 %{S:2} %{buildroot}%{_datadir}/applications/%{name}.desktop

%if 0%{?suse_version}
    %suse_update_desktop_file %{name}
    %fdupes -s %{buildroot}%{_prefix}
%endif

%files
%defattr(-,root,root,-)
%doc COPYRIGHT README
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/

%changelog