File naev.spec of Package naev

#
# spec file for package naev
#
# 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:           naev
Version:        0.6.1
Release:        1.1
Summary:        2D action RPG space game
License:        GPL-3.0
Group:          Amusements/Games/Action/Other
Url:            http://naev.org/
Source:         %{name}-%{version}.tar.bz2
Source1:        ndata-%{version}.zip
Source2:        %{name}.png
Source3:        %{name}.desktop
BuildRequires:  SDL2-devel
BuildRequires:  freetype2-devel
BuildRequires:  libpng-devel
BuildRequires:  libvorbis-devel
BuildRequires:  libxml2-devel
BuildRequires:  libzip-devel
BuildRequires:  openal-soft-devel
Requires:       %{name}-data = %{version}
%if %{suse_version} > 1210
BuildRequires:  lua51-devel
%else
BuildRequires:  lua-devel
%endif
BuildRequires:  readline-devel
BuildRequires:  update-desktop-files

%description
Naev is a 2D space trading and combat game, in a similar vein to Escape Velocity.

Naev is played from a top-down perspective, featuring fast-paced combat, many ships,
a large variety of equipment and a large galaxy to explore. The game is
open-ended, letting you proceed at your own pace.

%package data
Summary:        Data files for Naev, a 2D action RPG space game
Group:          Amusements/Games/Action/Other
Requires:       %{name} = %{version}
BuildArch:      noarch

%description data
This package contains the universal data for Naev.


%prep
%setup -q

%build
# note the ndata-path needs to point directly to the file
%configure --enable-lua=shared --without-sdlmixer --with-ndata-path=%{_datadir}/%{name}/ndata-%{version}.zip

make %{?_smp_mflags}

%install
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_bindir}

install -D -m 0755 src/%{name} %{buildroot}%{_bindir}/%{name}
install -D -m 0644 %{name}.6 %{buildroot}%{_mandir}/man6/%{name}.6
install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -D -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/applications/%{name}.desktop
install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/ndata-%{version}.zip

%suse_update_desktop_file %{name}

%files
%defattr(-,root,root)
%doc AUTHORS LICENSE README
%doc %{_mandir}/man6/*
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*.png

%files data
%defattr(-,root,root)
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*

%changelog
openSUSE Build Service is sponsored by