%global VERSION_YEAR 2025 %global VERSION_NUMBER 3 Name: trenchbroom Version: %{VERSION_YEAR}.%{VERSION_NUMBER} Release: 1 Summary: Cross-Platform Level Editor License: GPL-3.0-or-later and BSD-3-Clause and MIT URL: https://github.com/TrenchBroom/TrenchBroom Source0: %{url}/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz # TrenchBroom's build setup integrates vcpkg, which we do not want Patch: 0001-Remove-vcpkg.patch %if 0%{?fedora} <= 42 # miniz didn't correctly ship cmake files so before Fedora 43 we # need to vendor cmake stuff Patch: 0002-Backport-to-older-miniz-vendor-cmake-targets.patch %endif # We do not want to confuse the user with update notifications # and potentially have them install multiple versions of the same program Patch: 0003-Disable-update-check-by-default.patch # Fedora enables BUILD_SHARED_LIBS which turns turns libraries with # no specified types into shared libraries, which we don't want # https://github.com/TrenchBroom/TrenchBroom/pull/4897 Patch: 0004-Update-kdl-and-upd-to-be-static-libraries.patch # Build info is determined via git but we want to set it ourselves Patch: 0005-Set-build-info-via-options.patch # GLEW throws a non fatal error on init # https://github.com/TrenchBroom/TrenchBroom/issues/3326#issuecomment-2450099870 Patch: 0006-Ignore-GLEW-GLX-error.patch BuildRequires: gcc gcc-c++ BuildRequires: cmake BuildRequires: assimp-devel BuildRequires: freeimage-devel # next release will require catch3 BuildRequires: catch2-devel BuildRequires: fmt-devel BuildRequires: miniz-devel BuildRequires: tinyxml2-devel BuildRequires: freetype-devel BuildRequires: glew-devel BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qtsvg-devel BuildRequires: git BuildRequires: pandoc # Needed to run dump-shortcuts and tests due to Qt BuildRequires: xorg-x11-server-Xvfb %description TrenchBroom is a modern cross-platform level editor for Quake-engine based games. %prep %autosetup -n TrenchBroom-%{version} -p1 %build %cmake \ -DBUILD_VERSION_YEAR:STRING="%{VERSION_YEAR}" \ -DBUILD_VERSION_NUMBER:STRING="%{VERSION_NUMBER}" \ -DBUILD_PLATFORM_NAME:STRING="Fedora" \ -DCMAKE_PREFIX_PATH="cmake/packages;/app" %cmake_build %install %cmake_install %check pushd %{__cmake_builddir}/common/test xvfb-run ./common-regression-test xvfb-run ./common-test popd xvfb-run %{__cmake_builddir}/lib/kdl/test/kdl-test xvfb-run %{__cmake_builddir}/lib/vm/test/vm-test %files %license LICENSE.txt %{_bindir}/trenchbroom %{_datadir}/TrenchBroom %{_datadir}/mime/packages/trenchbroom.xml %changelog