File tbftss.spec of Package tbftss

#
# spec file for package tbftss
#
# 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:           tbftss
Version:        1.5.1
Release:        0
Summary:        A 2D mission-based space shooter
License:        GPL-2.0-only
Group:          Amusements/Games/Action/Arcade
URL:            https://github.com/stephenjsweeney/tbftss
#Git-Clone:     https://github.com/stephenjsweeney/tbftss.git
Source:         https://github.com/stephenjsweeney/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(SDL2_image)
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(SDL2_ttf)
Requires:       %{name}-data = %{version}
Recommends:     %{name}-lang = %{version}
%lang_package

%description
2D mission-based space shooter,
based on the Battle for the Solar System space opera novel trilogy.

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

%description data
This package contains the game data for tbftss
It is required to play the game.

%prep
%setup -q

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

%install
make install DESTDIR=%{buildroot} DATA_DIR=%{_datadir}/%{name}
%find_lang %{name}
%fdupes -s %{buildroot}/%{_datadir}/%{name}

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

%postun
%desktop_database_postun
%endif

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

%files lang -f %{name}.lang

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

%changelog
openSUSE Build Service is sponsored by