File ufoai-data.spec of Package ufoai

#
# spec file for package ufoai-data
#
# Copyright (c) 2025 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 game ufoai
Name:           %{game}-data
Version:        2.5+git20250324.763173ed03
Release:        0
Summary:        UFO:AI - data pack
License:        GPL-2.0-or-later
Group:          Amusements/Games/Strategy/Turn Based
URL:            https://ufoai.org/
BuildRequires:  zip
BuildArch:      noarch
Source0:        %{game}-%{version}.tar.bz2
%if !%{need_build}
BuildRequires:  do_not_build
%endif

%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
%setup -q -n %{game}-%{version}

%build
# not an autoconf-style configure
./configure
%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
openSUSE Build Service is sponsored by