File phlipple.spec of Package phlipple
#
# spec file for package phlipple
#
# Copyright (c) 2013 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: phlipple
Version: 0.8.2
Release: 0
Summary: Phlipping squares will never be the same again
License: GPL-3.0
Group: Amusements/Games/3D/Other
Url: http://phuzzboxmedia.com/index.php/games/phlipple
# Downloaded from SourceForge http://downloads.sourceforge.net/project/phlipple/phlipple-0.8.2.tar.gz
# Repacked as tar.bz2
Source: %{name}-%{version}.tar.bz2
Patch0: fix-gcc15.patch
BuildRequires: Mesa-devel
BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: SDL_mixer-devel
BuildRequires: glew-devel >= 1.6
BuildRequires: libvorbis-devel
BuildRequires: pkgconfig(glu)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
%description
Phlipple is a unique puzzle game. The goal of every level is to reduce a 3D shape to a single square. Elimination of squares is done by flipping edges around just like in a cardboard box.
It starts off relatively easy to teach the basics just to later on serve hours of brain tickling fun. It's a great way to train memory as well as orientation in 3D.
%prep
%autosetup -p1
%build
# Injecting -lm into the Makefile
sed -i -e "/^LIBS\s*=*/s|$| -lm|" Makefile.in src/Makefile.in
%configure docdir="%{_docdir}/%{name}"
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
# Remove useless doc file
rm %{buildroot}%{_docdir}/%{name}/{NEWS,INSTALL}
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%endif
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_docdir}/%{name}/
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog