%global asahi_mesa_ver 20240725 %global git_tag asahi-%{asahi_mesa_ver} %global basever 24.2.0 %global ver %{basever}-asahipre%{asahi_mesa_ver} %global sdk_ver 23.08 %global llvm_major 18 %global libclc_ver llvmorg-18.1.8 %global spirv_tools_ver v2024.2 %global spirv_headers_ver vulkan-sdk-1.3.283.0 %global spirv_llvm_translator_ver v18.1.2 %global meson_ver 1.5.0 Name: mesa-asahi-%{sdk_ver}-flatpak Summary: Mesa graphics libraries Flatpak overlay Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} Release: 1 License: MIT URL: http://www.mesa3d.org Source0: org.freedesktop.Platform.GL.host.yml Source1: bwrapwrapper Source10: https://gitlab.freedesktop.org/asahi/mesa/-/archive/%{git_tag}/mesa-%{git_tag}.tar.gz Source11: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/%{spirv_llvm_translator_ver}.tar.gz Source12: https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/%{spirv_headers_ver}.tar.gz Source13: https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/%{spirv_tools_ver}.tar.gz Source14: https://github.com/llvm/llvm-project/archive/refs/tags/%{libclc_ver}.tar.gz Source15: https://files.pythonhosted.org/packages/d6/97/852cc27c460d5fae07c6d7e4a2744f5684760358de3456b5ee9f130b8f57/meson-%{meson_ver}.tar.gz Requires: flatpak BuildRequires: flatpak-builder BuildRequires: fdo-runtime-%{sdk_ver}-flatpak BuildRequires: fdo-sdk-%{sdk_ver}-flatpak BuildRequires: fdo-sdk-extension-llvm%{llvm_major}-%{sdk_ver}-flatpak # We don't want any automatic provides/requires since this is a Flatpak, not a system app %global __provides_exclude_from ^.*$ %global __requires_exclude_from ^.*$ %description %{summary}. %prep sed \ -e "s,\%SRC_MESA,%SOURCE10,g" \ -e "s,\%SRC_SPIRV_LLVM_TRANSLATOR,%SOURCE11,g" \ -e "s,\%SRC_SPIRV_HEADERS,%SOURCE12,g" \ -e "s,\%SRC_SPIRV_TOOLS,%SOURCE13,g" \ -e "s,\%SRC_LIBCLC,%SOURCE14,g" \ -e "s,\%SRC_MESON,%SOURCE15,g" \ %SOURCE0 > org.freedesktop.Platform.GL.host.yml cp %SOURCE1 . chmod +x bwrapwrapper flatpak remote-add --user flathub https://0.0.0.0 flatpak remote-modify --user --collection-id=org.flathub.Stable flathub flatpak install --assumeyes --user flathub --sideload-repo=/usr/share/flatpak-sideload/fdo-sdk-%{sdk_ver}/ org.freedesktop.Sdk//%{sdk_ver} flatpak install --assumeyes --user flathub --sideload-repo=/usr/share/flatpak-sideload/fdo-runtime-%{sdk_ver}/ org.freedesktop.Platform//%{sdk_ver} flatpak install --assumeyes --user flathub --sideload-repo=/usr/share/flatpak-sideload/fdo-sdk-extension-llvm%{llvm_major}-%{sdk_ver}/ org.freedesktop.Sdk.Extension.llvm%{llvm_major}//%{sdk_ver} %build FLATPAK_BWRAP=$PWD/bwrapwrapper flatpak-builder --disable-rofiles-fuse --extra-sources=%{_sourcedir} build org.freedesktop.Platform.GL.host.yml %install mkdir -p %{buildroot}%{_sharedstatedir}/flatpak/extension/org.freedesktop.Platform.GL.host/$(flatpak --default-arch)/ mv build/files %{buildroot}%{_sharedstatedir}/flatpak/extension/org.freedesktop.Platform.GL.host/$(flatpak --default-arch)/%{sdk_ver} ln -s share/glvnd share/vulkan %{buildroot}%{_sharedstatedir}/flatpak/extension/org.freedesktop.Platform.GL.host/$(flatpak --default-arch)/%{sdk_ver}/ %files %{_sharedstatedir}/flatpak/extension/org.freedesktop.Platform.GL.host/ %changelog * Thu Jul 25 2024 Hector Martin - 24.2.0~asahipre20240725-1 - Bump to 24.2.0~asahipre20240725-1 * Tue Jul 16 2024 Hector Martin - 24.2.0~asahipre20240527-2 - Rename extension to `host`, drop env override, drop libdrm * Mon Jul 15 2024 Hector Martin - 24.2.0~asahipre20240527-1 - Initial release