File ufoai-data.spec of Package ufoai
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#
%define need_build 1
%define build_tar_ball 1
%define game ufoai
Name: %{game}-data
Version: 2.5+git20230421.7c4ccd5f9d
Release: 0
Summary: UFO:AI - data pack
License: GPL-2.0-or-later
Group: Amusements/Games/Strategy/Turn Based
URL: https://ufoai.org/
%if %{build_tar_ball}
Source0: %{game}-%{version}.tar.bz2
%else
Source0: _service
%endif
BuildArch: noarch
%if !%{need_build}
BuildRequires: do_not_build
%endif
BuildRequires: zip
%package -n %{game}-music
Summary: UFO:AI - music pack
BuildArch: noarch
%description
UFO: ALIEN INVASION is a strategy game featuring tactical combat
against hostile alien forces which are about to infiltrate earth at
this very moment.
This is the Data-Pack for UFO:AI. It is mandatory to play.
%description -n %{game}-music
UFO: ALIEN INVASION is a strategy game featuring tactical combat
against hostile alien forces which are about to infiltrate earth at
this very moment.
This is the Music-Pack for UFO:AI. It is optional to play.
%prep
%if %{build_tar_ball}
%setup -q -n %{game}-%{version}
%else
%setup -q -n %_sourcedir/%game-%version -T -D
%endif
%build
# not an autoconf-style configure
./configure --prefix=%{_prefix} \
--bindir=%{_bindir} \
--datadir=%{_datadir}/%{name} \
--libdir=%{_libdir}/%{name} \
--localedir=%{_datarootdir}/locale \
--disable-uforadiant \
--disable-testall \
%ifarch x86_64 i586
--enable-sse \
%endif
--enable-release
%make_build pk3 PAK_FILES="0materials.pk3 0media.pk3 0snd.pk3 \
0pics.pk3 0shaders.pk3 0models.pk3 \
0textures.pk3 0videos.pk3 0music.pk3"
%install
%__install -D -m 0664 -t %{buildroot}%{_datadir}/%{game}/base base/*.pk3
%files
%dir %{_datadir}/%{game}
%dir %{_datadir}/%{game}/base
%{_datadir}/%{game}/base/{0videos,0media,0materials,0pics}.pk3
%{_datadir}/%{game}/base/{0shaders,0textures,0models,0snd}.pk3
%files -n %{game}-music
%dir %{_datadir}/%{game}
%dir %{_datadir}/%{game}/base
%{_datadir}/%{game}/base/0music.pk3
%changelog