File gnurobbo.spec of Package gnurobbo

#
# spec file for package gnurobbo
#
# 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:           gnurobbo
Version:        0.66
Release:        0
Summary:        GNU Robbo
License:        GPL-2.0
Group:          Amusements/Games/Action/Arcade
Url:            http://gnurobbo.sourceforge.net/
# Downloaded from SourceForge http://sourceforge.net/projects/gnurobbo/files/gnurobbo/gnurobbo-0.66/gnurobbo-0.66-source.tar.gz/download
# Repacked as tar.bz2
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0:         %{name}-%{version}-libs.patch
BuildRequires:  SDL-devel
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  SDL_ttf-devel
BuildRequires:  fdupes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif

%description
GNU Robbo is a very addictive logic game. You must help
little robot to get out of an unfriendly planet, collecting
parts of an emergency capsule.

%prep
%setup -q
%patch0

%build
export CFLAGS="%{optflags}"
make BINDIR="%{_bindir}" PACKAGE_DATA_DIR="%{_datadir}/%{name}" DOCDIR="%{_docdir}/%{name}"

%install
make BINDIR="%{buildroot}%{_bindir}" PACKAGE_DATA_DIR="%{buildroot}%{_datadir}/%{name}" DOCDIR="%{buildroot}%{_docdir}/%{name}" install
# Install missing doc files
install -m 644 LICENSE-ttf AUTHORS %{buildroot}/%{_docdir}/%{name}/
install -d -D -m 755 %{buildroot}%{_datadir}/applications/
install -D -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/
install -d -D -m 755 %{buildroot}%{_datadir}/pixmaps/
install -D -m 644 icon32.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%endif
%fdupes %{buildroot}

%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