File blobwarsAttrition.spec of Package blobwarsAttrition

#
# spec file for package blobwarsAttrition
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018, Martin Hauke <mardnh@gmx.de>
#
# 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 https://bugs.opensuse.org/
#


Name:           blobwarsAttrition
Version:        1.2.2
Release:        0
Summary:        A 2D mission and objective-based platform game
License:        GPL-3.0-only
Group:          Amusements/Games/Action/Arcade
URL:            http://parallelrealities.co.uk/games/attrition/
#Git-Clone:     https://github.com/stephenjsweeney/blobwarsAttrition.git
Source:         https://github.com/stephenjsweeney/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        http://parallelrealities.co.uk/downloads/blobWarsAttrition/blobWarsAttrition-demo-data.tar.gz
Source2:        %{name}-wrapper.sh
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(SDL2_image)
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(SDL2_ttf)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(zlib)
Requires:       %{name}-data = %{version}

%description
Blob Wars : Attrition is a 2D mission and objective-based platform game.
It is the third game in the Blob Wars series.

%package data
Summary:        Architecture independent data for Blob Wars : Attrition
Group:          Amusements/Games/Action/Arcade
Requires:       %{name} = %{version}
BuildArch:      noarch

%description data
This package contains the game data for Blob Wars : Attrition.
It is required to play the game.

%package data-demo
Summary:        Demo game data for Blob Wars : Attrition
Group:          Amusements/Games/Action/Arcade
Requires:       %{name} = %{version}
BuildArch:      noarch

%description data-demo
This package contains the demo game data for Blob Wars : Attrition.

%prep
%setup -q -a 1

%build
export CFLAGS='%{optflags}'
make %{?_smp_mflags} DATA_DIR=%{_datadir}/%{name}

%install
make install DESTDIR=%{buildroot} DATA_DIR=%{_datadir}/%{name}
install -d %{buildroot}/%{_libexecdir}/%{name}
mv %{buildroot}%{_bindir}/%{name} %{buildroot}/%{_libexecdir}/%{name}/%{name}
install -Dm0755 %{SOURCE2} %{buildroot}/%{_bindir}/%{name}

%if 0%{?suse_version} < 1330
%post
%desktop_database_post

%postun
%desktop_database_postun
%endif

%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png

%files data
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/gfx
%{_datadir}/%{name}/manual
%{_datadir}/%{name}/music
%{_datadir}/%{name}/sound

%files data-demo
%{_datadir}/%{name}/data

%changelog
openSUSE Build Service is sponsored by