File tuxomania.spec of Package tuxomania

#
# spec file for package tuxomania
#
# Copyright 2009 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.

Name:           tuxomania
BuildRequires:  gcc-c++ SDL-devel SDL_image-devel SDL_ttf-devel Mesa-devel libxerces-c-devel cmake dos2unix fdupes bitstream-vera
Summary:        You control Tux the penguin and must collect all the pearls in each level
Version:        0.0.3
Release:        1
License:        GPLv3; CC-BY-SA
Group:          Amusements/Games/Action/Arcade
# Downloaded from SourceForge
Source:         %{name}-%{version}-src.tar.bz2
Patch0:         %{name}-fix-compile-error.patch
Patch1:         tuxomania-0.0.3-no_freetype_dependency.patch
Url:            https://sourceforge.net/projects/tuxomania/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
%if 0%{?suse_version} > 1020
BuildRequires:  fdupes
%endif
Requires:       bitstream-vera

%description
Tuxomania is a platform game in isometric 3d. The player controls Tux the penguin and must collect all the pearls in each level, which includes solving puzzles and avoiding monsters. 

The game is in an early stage. The current version contains only three test levels and can't be completed.

Authors:
--------
    Vincent Petry <PVince81@users.sourceforge.net>

%prep
%setup -q -n %{name}-%{version}-src
%patch0 -p1
%patch1
dos2unix doc/README-SDL*.txt

%build
make PREFIX="%{_prefix}" DATA_PATH="%{_datadir}/%{name}"

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

# Use shared Vera font instead of the bundled one
ln -sf %{_datadir}/fonts/truetype/Vera.ttf %{buildroot}/%{_datadir}/%{name}/fonts/

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

%if 0%{?suse_version} > 1020
%fdupes %{buildroot}
%endif


%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/*
%dir %{_docdir}/%{name}/
%{_docdir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by