File Bugdom.spec of Package Bugdom
#
# spec file for package Bugdom
#
# Copyright (c) 2024 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: Bugdom
Version: 1.3.4
Release: 0
Summary: Port of 1999 3D platform video game
License: CC-BY-SA-4.0
Group: Amusements/Games/3D/Other
URL: https://pangeasoft.net/bug/info.html
#Git-Clone: https://github.com/jorio/Bugdom.git
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake >= 3.3
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(sdl2)
# extern/Pomme/LICENSE.md
Provides: bundled(pomme)
%description
Bugdom is a 1999 platform video game developed by Pangea Software included
with early Apple iMac and iBook models.
%prep
%autosetup
%cmake \
-G "Unix Makefiles" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release
%build
cd build
%cmake_build
%install
mkdir -p %{buildroot}%{_bindir} \
%{buildroot}%{_libexecdir}/%{name}
mv build/{Data,%{name}} %{buildroot}%{_libexecdir}/%{name}
# Create wrapper script
echo -e '#!%{_bindir}/sh\n\ncd %{_libexecdir}/%{name}/;./%{name}' > \
'%{buildroot}%{_bindir}/%{name}'
chmod +x %{buildroot}%{_bindir}/%{name}
for i in 32 128 512 ; do
install -Dm 0644 packaging/Bugdom${i}.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
done
%fdupes -s %{buildroot}/%{_libexecdir}/%{name}/
%suse_update_desktop_file -c %{name} %{name} "Save Bugdom from Thorax's evil Fire Ants" %{name} %{name} "Game;ArcadeGame;"
%files
%license {LICENSE.md,docs,README.md}
%{_bindir}/%{name}
%{_libexecdir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%changelog