File brainparty.spec of Package brainparty

#
# spec file for package brainparty
#
# 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 http://bugs.opensuse.org/
#


Name:           brainparty
Version:        0.61
Release:        0
Summary:        Brain-stretching game with 36 minigames
License:        GPL-3.0
Group:          Amusements/Games/Logic
Url:            https://launchpad.net/brainparty
# Source downloaded from
Source:         http://launchpad.net/brainparty/trunk/0.61/+download/%{name}%{version}.tar.gz
Source1:        %{name}-wrapper.sh
Source2:        %{name}.desktop
Source3:        %{name}.png
# PATCH-FIX-UPSTREAM fix-FTBFS-with-GCC-4.9.patch
Patch0:         fix-FTBFS-with-GCC-4.9.patch
# PATCH-FIX-OPENSUSE fix-makefile.patch
Patch1:         fix-makefile.patch
BuildRequires:  Mesa-devel
BuildRequires:  SDL-devel
BuildRequires:  SDL_gfx-devel
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  SDL_ttf-devel
BuildRequires:  gcc-c++
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif

%description
Brain Party is a puzzle-solving, brain-stretching game that comes with 36 minigames designed to push your brain to its limits, testing memory, logic, mathematics, reactions and more.

%prep
%setup -q -n %{name}
%patch0 -p1
%patch1 -p1

%build
CXXFLAGS="%{optflags}" make %{?_smp_mflags}

%install
install -d -D -m 755 "%{buildroot}/%{_datadir}/%{name}"
install -D -m 644 Content/* "%{buildroot}/%{_datadir}/%{name}/"
# Install binary and wrapper
install -D -m 755 "%{name}" "%{buildroot}/%{_bindir}/%{name}-bin"
install -D -m 755 "%{SOURCE1}" "%{buildroot}/%{_bindir}/%{name}"
install -d -D -m 755  "%{buildroot}/%{_datadir}/applications/"
install -D -m 644 "%{SOURCE2}" "%{buildroot}/%{_datadir}/applications/"
install -d -D -m 755  "%{buildroot}/%{_datadir}/pixmaps/"
install -D -m 644 "%{SOURCE3}" "%{buildroot}/%{_datadir}/pixmaps/"
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%endif

%files
%defattr(-,root,root,-)
%doc README COPYING CREDITS
%{_bindir}/%{name}
%{_bindir}/%{name}-bin
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by