## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global forgeurl https://github.com/f3d-app/f3d/ Version: 2.2.1 %forgemeta Name: f3d Release: %autorelease Summary: A fast and minimalist 3D viewer License: BSD-3-Clause AND MIT URL: https://f3d.app/ Source0: %{forgesource} Patch0: help2man.patch BuildRequires: gcc gcc-c++ BuildRequires: cmake BuildRequires: cmake(vtk) BuildRequires: help2man # optional plugins BuildRequires: cmake(assimp) BuildRequires: cmake(OpenCASCADE) BuildRequires: cmake(alembic) # alembic plugin requires imath BuildRequires: cmake(imath) BuildRequires: cmake(draco) BuildRequires: cmake(OpenEXR) BuildRequires: cxxopts-static BuildRequires: json-static BuildRequires: desktop-file-utils BuildRequires: libappstream-glib %description F3D is a fast and minimalist 3D viewer. It supports many file formats, from digital content to scientific datasets (including glTF, STL, STEP, PLY, OBJ, FBX, Alembic), can show animations and support thumbnails and many rendering and texturing options including real time physically based rendering and raytracing. It is fully controllable from the command line and support configuration files. It can provide thumbnails, support interactive hotkeys, drag&drop and integration into file managers. %prep %forgeautosetup -p0 # remove bundled libraries rm -r external %build %cmake -DCMAKE_SKIP_RPATH=YES \ -DF3D_USE_EXTERNAL_CXXOPTS=YES \ -DF3D_USE_EXTERNAL_NLOHMANN_JSON=YES \ -DF3D_MODULE_EXR=YES \ -DF3D_PLUGIN_BUILD_EXODUS=YES \ -DF3D_PLUGIN_BUILD_OCCT=YES \ -DF3D_PLUGIN_BUILD_ASSIMP=YES \ -DF3D_PLUGIN_BUILD_ALEMBIC=YES \ -DF3D_PLUGIN_BUILD_DRACO=YES \ -DF3D_LINUX_GENERATE_MAN=YES %cmake_build %install %cmake_install %cmake_install --component configuration %cmake_install --component documentation %cmake_install --component mimetypes %cmake_install --component sdk # as per https://docs.fedoraproject.org/en-US/packaging-guidelines/AppData/ # the .metainfo.xml file has to be renamed to match the .desktop file mv %{buildroot}/%{_metainfodir}/app.f3d.F3D.metainfo.xml %{buildroot}/%{_metainfodir}/%{name}.metainfo.xml # remove static libraries rm %{buildroot}/%{_libdir}/*.a # rename doc dir mv %{buildroot}/%{_docdir}/F3D %{buildroot}/%{_docdir}/%{name} %check desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}-plugin-native.desktop appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml %files %{_bindir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/ %{_datadir}/applications/%{name}*.desktop %{_datadir}/thumbnailers/%{name}*.thumbnailer %{_metainfodir}/%{name}.metainfo.xml %{_datadir}/bash-completion/completions/%{name} %{_datadir}/fish/vendor_completions.d/%{name}.fish %{_datadir}/zsh/site-functions/_%{name} %{_datadir}/icons/hicolor/32x32/apps/%{name}.png %{_datadir}/icons/hicolor/48x48/apps/%{name}.png %{_datadir}/icons/hicolor/64x64/apps/%{name}.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_datadir}/%{name}/ %{_datadir}/mime/packages/%{name}*.xml %{_mandir}/man1/%{name}.1* %license %{_docdir}/%{name}/LICENSE.md %license %{_docdir}/%{name}/THIRD_PARTY_LICENSES.md %doc README.md %package libs Summary: f3d shared libraries %description libs f3d shared libraries %files libs %{_libdir}/lib%{name}.so.2{,.*} %license %{_docdir}/%{name}/LICENSE.md %license %{_docdir}/%{name}/THIRD_PARTY_LICENSES.md %doc README.md %package devel Requires: %{name}-libs%\{?_isa} = %{version}-%{release} Summary: f3d development files %description devel f3d development files %files devel %{_libdir}/lib%{name}.so %{_libdir}/cmake/%{name}/ %{_includedir}/%{name}/ %license %{_docdir}/%{name}/LICENSE.md %license %{_docdir}/%{name}/THIRD_PARTY_LICENSES.md %doc README.md %changelog * Thu Oct 12 2023 Philip Matura - 2.2.1-1 - Update to 2.2.1 * Thu Oct 12 2023 Philip Matura - 2.1.0-5 - Unbundle third party libraries (cxxopts & json) - Fix manpage generation * Wed Sep 20 2023 Philip Matura - 2.1.0-4 - Build against draco as shared library from f39 onwards * Wed Sep 20 2023 Philip Matura - 2.1.0-3 - Split into -libs and -devel subpackages - Enable file loading plugins * Thu Aug 31 2023 Philip Matura - 2.1.0-2 - Correct project homepage URL * Wed Aug 30 2023 Philip Matura - 2.1.0-1 - Initial build