Name: opensurge Summary: 2D retro platformer inspired by Sonic games License: GPLv3 Version: 0.5.1.2 Release: 4%{?dist} URL: https://opensurge2d.org Source0: https://github.com/alemart/opensurge/archive/v%{version}/%{name}-%{version}.tar.gz Provides: bundled(hanyang-gothic-A1-fonts) BuildRequires: allegro5-devel BuildRequires: allegro5-addon-acodec-devel BuildRequires: allegro5-addon-audio-devel BuildRequires: allegro5-addon-dialog-devel BuildRequires: allegro5-addon-image-devel BuildRequires: allegro5-addon-ttf-devel BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libappstream-glib BuildRequires: surgescript-devel Requires: google-roboto-fonts Requires: %{name}-data = %{version}-%{release} %description Open Surge is a fun 2D retro platformer inspired by Sonic games, and a game creation system that lets you unleash your creativity! Open Surge is two projects in one: a game and a game creation system (game engine). %package data Summary: Data files for opensurge BuildArch: noarch # Most of the game's assets are licensed under CC-BY 3.0. # Some individual files are licensed under CC-BY-SA 3.0 / Public Domain. # # There also bundled fonts: # - Roboto fonts, but we un-bundle them, so they don't apply here # - The HanYang Gothic A1 fonts, subject to the Open Font License # # For a detailed list, consult src/misc/credits.c inside the source archive. License: CC-BY and CC-BY-SA and CC0 and OFL and Public Domain %description data Data files (graphics, music, sounds) required by Open Surge. %prep %setup -q %build mkdir build && cd build %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DUSE_A5=ON \ -DALLEGRO_STATIC=OFF \ -DALLEGRO_MONOLITH=OFF \ "-DGAME_DATADIR=%{_datadir}/%{name}" \ -DESKTOP_INSTALL=ON \ "-DDESKTOP_ENTRY_PATH=%{_datadir}/applications" \ "-DDESKTOP_ICON_PATH=%{_datadir}/pixmaps" \ "-DDESKTOP_METAINFO_PATH=%{_metainfodir}" \ .. %make_build %install cd build/ %make_install # The install section of CMakeLists.txt just plops the executable inside /usr/ # We need to move it to /usr/bin/ install -m 755 -d %{buildroot}%{_bindir} mv %{buildroot}%{_prefix}/%{name} %{buildroot}%{_bindir}/%{name} # Remove bundled fonts and replace them with symlinks for ROBOTO in Roboto-Black Roboto-Bold Roboto-Medium; do ln -sf \ "%{_datadir}/fonts/google-roboto/${ROBOTO}.ttf" \ "%{buildroot}/%{_datadir}/%{name}/fonts/${ROBOTO}.ttf" done %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/%{name}.appdata.xml %files %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/metainfo/%{name}.appdata.xml %{_datadir}/pixmaps/%{name}.png %files data %license LICENSE %{_datadir}/%{name}/ %changelog * Mon Apr 13 2020 Artur Iwicki - 0.5.1.2-4 - Unbundle surgescript - Drop Source1 (updated CMakeLists.txt) - not needed since we no longer link surgescript statically - Once again correct the License: tag on the -data subpackage and add a comment explaining the licensing breakdown - Add a Provides: bundled() for the HanYang fonts * Sun Apr 12 2020 Artur Iwicki - 0.5.1.2-2 - Correct the License: tag on the -data subpackage - Unbundle Roboto fonts * Sat Apr 11 2020 Artur Iwicki - 0.5.1.2-1 - Initial packaging