File naikari.spec of Package naikari
#
# spec file for package naikari
#
# 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/
#
Name: naikari
Version: 0.12.0
Release: 0
Summary: 2D space trading and mercenary sandbox game
License: GPL-3.0-only AND CC-BY-SA-4.0
Group: Amusements/Games/Action/Other
URL: https://naikari.github.io/
Source: https://github.com/naikari/naikari/releases/download/v%{version}/%{name}-%{version}-source.tar.xz
# PATCH-FIX-UPSTREAM - naikari-add-missing-limits-headers.patch - adds missing limits.h
Patch0: naikari-add-missing-limits-headers.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: glpk-devel
BuildRequires: hicolor-icon-theme
BuildRequires: intltool
BuildRequires: luajit-devel
BuildRequires: meson >= 0.55.0
BuildRequires: openal-soft-devel
BuildRequires: pkgconfig
BuildRequires: python3-pyaml
BuildRequires: readline-devel
BuildRequires: suitesparse-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(SDL2_image)
BuildRequires: pkgconfig(SDL2_mixer)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libunibreak)
BuildRequires: pkgconfig(libwebp)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(physfs)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(vorbis)
%description
You pilot space ships from a top-down perspective which you can
collect and customize more or less however you want. To get new
ships, you can deliver cargo, hunt bounties, join and assist
various factions, or even turn to piracy if you dare go against
the Empire. Additionally, to keep the game feeling fresh and
allow you to seek out goals beyond just getting more credits
and ships, several storylines are available which you can
proceed through if you wish. All storylines are optional and
kept out of the way if you have no interest in them.
%prep
%autosetup -p1
# Remove third part libraries so we're guaranteed to use system libraries
rm -rf subprojects/packagefiles
%build
# Disabling C and LUA docs since those are only required if you're hacking on Naikari
# Disabling debug because it would need BuildRequires backtrace which is only in available in repo network:cryptocurrencies
%meson \
-Ddocs_c=disabled \
-Ddocs_lua=disabled \
-Ddebug=false
%meson_build
%install
%meson_install
# Remove docs we package in doc
rm -Rf %{buildroot}%{_datadir}/doc/%{name}
rm -Rf %{buildroot}%{_datadir}/%{name}/dat/AUTHORS
# Clean up some unneeded scripts and other development files
find %{buildroot}%{_datadir}/%{name} -name '*.sh' -exec rm {} \;
# Fix file has executable bits set rpmlint warning
chmod -x %{buildroot}%{_datadir}/%{name}/dat/gui/neo.lua
# find_lang only finds one type of filename, this one all .mo files.
for dir in %{buildroot}/%{_datadir}/naikari/dat/gettext/*; do
for file in "$dir/LC_MESSAGES/"*.mo; do
echo "%%lang($(basename "$dir")) /$(realpath --relative-to %{buildroot} "$file")" >> %{name}.lang
done
done
%fdupes %{buildroot}%{_datadir}
%files -f %{name}.lang
%license LICENSE
%doc Changelog.md Readme.md dat/AUTHORS
%{_mandir}/man6/*
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/metainfo/*.xml
%{_datadir}/icons/hicolor/*x*/apps/*.png
%{_datadir}/%{name}/
%changelog