LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File polly-b-gone.spec of Package polly-b-gone (Project games)

#
# spec file for package polly-b-gone
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright Vincent Petry <PVince81@yahoo.fr>
#
# 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:           polly-b-gone
Version:        1.0
Release:        0
Summary:        A 3D physics platform game
License:        LGPL-3.0
Group:          Amusements/Games/3D/Other
Url:            http://cs.stanford.edu/people/mbostock/polly/
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
Source2:        %{name}.png
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0:         polly-b-gone-01-libs.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1:         polly-b-gone-02-Makefile.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch2:         polly-b-gone-03-Makefile-install.patch
BuildRequires:  Mesa-devel
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
BuildRequires:  gcc-objc
BuildRequires:  glew-devel
BuildRequires:  libSDL-devel
BuildRequires:  libSDL_image-devel
BuildRequires:  libSDL_mixer-devel
BuildRequires:  libtinyxml-devel
Requires:       opengl-games-utils
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif

%description
A 3D physics platform game - won the grand prize in the 10th annual CS 248 video game competition!

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2

%build
make CXXFLAGS="%{optflags} -DRESOURCEDIR=\"\\\"%{_datadir}/%{name}/\\\"\"" PREFIX=%{_prefix} DATADIR=%{_datadir}/%{name}

%install
make install DESTDIR=%{buildroot} PREFIX=%{_prefix} BINDIR=%{_bindir} DATADIR=%{_datadir}/%{name}
install -D -m 644 %{SOURCE1} %{buildroot}/%{_datadir}/applications/%{name}.desktop
install -D -m 644 %{SOURCE2} %{buildroot}/%{_datadir}/pixmaps/%{name}.png
# set up opengl wrapper
ln -s opengl-game-wrapper.sh %{buildroot}%{_bindir}/%{name}-wrapper
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%endif

%files
%defattr(-,root,root)
%doc README.txt LGPL-3.0.txt
%attr(0755,root,root) %{_bindir}/%{name}
%attr(0755,root,root) %{_bindir}/%{name}-wrapper
%attr(0644,root,root) %{_datadir}/applications/%{name}.desktop
%attr(0644,root,root) %{_datadir}/pixmaps/*
%attr(0755,root,root) %dir %{_datadir}/%{name}
%attr(0644,root,root) %{_datadir}/%{name}/*

%changelog