File xye.spec of Package xye

# spec file for package xye
# Copyright (c) 2016 SUSE LINUX 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

Name:           xye
Version:        0.12.2
Release:        0
Summary:        Puzzle game where the goal is to collect all the gems in the room
License:        Zlib
Group:          Amusements/Games/Logic
# PATCH-FIX-OPENSUSE - xye.desktop.patch -- Fix invalid-desktopfile
Patch0:         %{name}.desktop.patch
# PATCH-FIX-UPSTREAM fix-gcc6.patch --
Patch1:         fix-gcc6.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  dejavu-fonts
BuildRequires:  dos2unix
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(SDL_image)
BuildRequires:  pkgconfig(SDL_ttf)
BuildRequires:  pkgconfig(sdl)
Requires:       %{name}-data
Requires:       %{name}-skins
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  update-desktop-files

Xye is a puzzle game in which the objective is to help a character
that looks like a green circle to get all the gems in the room.
This is, of course, not as easy as it sounds, Xye must solve
all sorts of puzzles while at the same time avoiding all sorts
of traps and beasts.

Xye is similar to other puzzle games like sokoban or boulderdash,
yet it also includes some arcade elements.

Xye is a derivative of a classic windows game called Kye, which
is the base of the gameplay experience and visual elements.
Xye is able to play level files that were made for Kye and Sokoban.
It is also able to play custom .xye files, a richer level format that
allows the new objects and features, you can make these levels by hand
or by using the built-in editor that comes with the game.

%setup -q
%patch1 -p1

# Convert to unix line end
find -name "*.xml" -print0 -or -name "*.h" -print0 -or -name "*.cpp" -print0 -or -name "*.xye" -print0 -or -name "*.rc " -print0 | xargs -0 dos2unix

# Some docs have the DOS line ends
dos2unix COPYING

# SED-FIX-OPENSUSE -- Fix Documentation
sed -i 's|ReadMe.html NEWS ChangeLog AUTHORS||'

autoreconf -fi

make %{?_smp_mflags}

make %{?_smp_mflags} DESTDIR=%{buildroot} install

# install icon
install -Dm 0644 pixmaps/%{name}.svg %{buildroot}%{_datadir}/pixmaps/

# Use system fonts instead of bundling our own
rm -f %{buildroot}%{_datadir}/%{name}/res/{DejaVuSans-Bold.ttf,DejaVuSans.ttf}
ln -s ../../fonts/truetype/DejaVuSans-Bold.ttf %{buildroot}%{_datadir}/%{name}/res/DejaVuSans-Bold.ttf
ln -s ../../fonts/truetype/DejaVuSans.ttf %{buildroot}%{_datadir}/%{name}/res/DejaVuSans.ttf

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

%doc AUTHORS COPYING ChangeLog NEWS ReadMe.html

openSUSE Build Service is sponsored by