# disable to skip tests %bcond_without tests Name: openrct2 Version: 0.4.6 Release: 1%{?dist} # these should only be updated in tandem with a new version (afaict) %global objects_version 1.3.11 %global sequences_version 0.4.6 %global replays_version 0.0.78 %global soundeffects_version 1.0.3 %global music_version 1.3.1 Summary: An open source re-implementation of RollerCoaster Tycoon 2 License: GPLv3 and CC-BY-SA URL: https://www.openrct2.org Source0: https://github.com/OpenRCT2/OpenRCT2/archive/v%{version}.tar.gz#/OpenRCT2-%{version}.tar.gz Source1: https://github.com/OpenRCT2/objects/releases/download/v%{objects_version}/objects.zip#/objects-v%{objects_version}.zip Source2: https://github.com/OpenRCT2/title-sequences/releases/download/v%{sequences_version}/title-sequences.zip#/title-sequences-v%{sequences_version}.zip %if %{with tests} Source3: https://github.com/OpenRCT2/replays/releases/download/v%{replays_version}/replays.zip#/replays-v%{replays_version}.zip %endif Source4: https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v%{soundeffects_version}/opensound.zip#/opensound-v%{soundeffects_version}.zip Source5: https://github.com/OpenRCT2/OpenMusic/releases/download/v%{music_version}/openmusic.zip#/openmusic-v%{music_version}.zip BuildRequires: gcc-c++ desktop-file-utils cmake google-benchmark-devel json-devel libicu-devel openssl-devel duktape-devel flac-devel libvorbis-devel pkgconfig pkgconfig(sdl2) pkgconfig(speexdsp) pkgconfig(libcurl) pkgconfig(fontconfig) pkgconfig(freetype2) pkgconfig(libpng) pkgconfig(libzip) pkgconfig(zlib) pkgconfig(gl) %if %{with tests} BuildRequires: gtest-devel %endif %description OpenRCT2 is an open-source re-implementation of RollerCoaster Tycoon 2 (RCT2), expanding the game with new features, fixing bugs and raising game limits. The gameplay revolves around building and maintaining an amusement park containing attractions, shops and facilities. The player must try to make a profit and maintain a good park reputation whilst keeping the guests happy. OpenRCT2 allows for both scenario and sandbox play. Scenarios require the player to complete a certain objective in a set time limit whilst sandbox allows the player to build a more flexible park with optionally no restrictions or finance. Please note that the original RollerCoaster Tycoon 2 game files are required in order to play OpenRCT2; visit https://openrct2.io/getting-started/ for details. %prep # This gets repeated a lot, unfortunately %global srcdir_name OpenRCT2-%{version} %setup -q -n %{srcdir_name} # Fedora json package uses amalgamated header sed -i 's#nlohmann/json_fwd.hpp#nlohmann/json.hpp#' src/openrct2/core/JsonFwd.hpp # CMakeLists pulls in data/* for install, so put these there too %setup -q -T -a 1 -c -n %{srcdir_name}/data/object %setup -q -T -a 2 -c -n %{srcdir_name}/data/sequence %if %{with tests} # replays for testing %setup -q -T -a 3 -c -n %{srcdir_name}/test/tests/testdata/replays %endif %setup -q -T -a 4 -c -n %{srcdir_name}/data/assetpack/openrct2.sound.parkap %setup -q -T -a 5 -c -n %{srcdir_name}/data/assetpack/openrct2.music.alternative.parkap # change directory once more with feeling %setup -q -T -D -n %{srcdir_name} %build CXXFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=restrict" %if %{without tests} %global cmake_test_opts -DWITH_TESTS=ON -DSYSTEM_GTEST=ON %endif %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DDOWNLOAD_TITLE_SEQUENCES=OFF \ -DDOWNLOAD_OBJECTS=OFF \ -DDOWNLOAD_REPLAYS=OFF \ -DDOWNLOAD_OPENSFX=OFF \ -DDOWNLOAD_OPENMSX=OFF \ -DDISABLE_DISCORD_RPC=ON \ %if 0%{?fedora} <= 35 -DDISABLE_GOOGLE_BENCHMARK=ON \ %endif %{?cmake_test_opts} %cmake_build # data %cmake_build --target g2 %install %cmake_install %check %if %{with tests} %ctest %endif desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}*.desktop %files %{_bindir}/%{name} %{_bindir}/%{name}-cli %{_libdir}/lib%{name}.so %dir %{_datadir}/%{name} %{_datadir}/%{name}/* %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/* %license %{_docdir}/%{name}/licence.txt %{_datadir}/icons/hicolor/*/apps/%{name}.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_datadir}/applications/%{name}*.desktop %{_datadir}/mime/packages/%{name}.xml %{_datadir}/metainfo/%{name}.appdata.xml %{_datadir}/man/man6/%{name}.6.gz %{_datadir}/man/man6/%{name}-cli.6.gz %changelog * Sun Sep 03 2023 Christian Birk - 0.4.6-1 - new version - disable tests as these are broken for some reason * Sat Aug 05 2023 Christian Birk - 0.4.5-2 - rebuilt for dependencies - update title-sequences and open-music dependencies * Mon May 08 2023 Christian Birk - 0.4.5-1 - new version * Wed Mar 29 2023 Christian Birk - 0.4.4-1 - new version * Wed Dec 14 2022 Christian Birk - 0.4.3-1 - new version * Wed Oct 05 2022 Christian Birk - 0.4.2-1 - new version * Mon Jul 04 2022 H3o66 - 0.4.1-1 - new version * Mon Apr 25 2022 H3o66 - 0.4.0-1 - Update to Version 0.4.0 * Mon Apr 18 2022 Christian Birk - 0.3.5.1-2 - rebuild with spec file for upgrade * Sat Nov 27 2021 Will Springer - 0.3.5.1-1 - Update to 0.3.5.1 * Sat Nov 6 2021 Will Springer - 0.3.5-1 - Update to 0.3.5 * Tue Jul 27 2021 Will Springer - 0.3.4.1-1 - Update to 0.3.4.1 - Add sources file with checksums - Small change to testdata handling * Mon Jul 19 2021 Will Springer - 0.3.4-1 - Update to 0.3.4 - Enable tests by default * Tue Apr 6 2021 Will Springer - 0.3.3-1 - Fork from copr://nauticalnexus/openrct2 - Clean, update, and refactor spec