From 6a2ff842fdbabf68ba54b393a191631213d95b08 Mon Sep 17 00:00:00 2001
From: Asahi Lina <lina@asahilina.net>
Date: Dec 06 2024 12:18:42 +0000
Subject: Add rust-stable & bump to 24.08.6


Attempt at making Rusticl work with Flatpak

---

diff --git a/fdo-sdk-flatpak.spec b/fdo-sdk-flatpak.spec
index 727aed0..849919f 100644
--- a/fdo-sdk-flatpak.spec
+++ b/fdo-sdk-flatpak.spec
@@ -1,23 +1,27 @@
 %global branch 24.08
-%global version 24.08.2
+%global version 24.08.6
 %global llvm_major 18
 %global llvm_version 18.1.8
+%global rust_version 1.82.0
 
 # Check for updates with:
 #  flatpak remote-info --arch=x86_64 flathub org.freedesktop.Platform//24.08
 #  flatpak remote-info --arch=x86_64 flathub org.freedesktop.Sdk//24.08
 #  flatpak remote-info --arch=x86_64 flathub org.freedesktop.Sdk.Extension.llvm18//24.08
+#  flatpak remote-info --arch=x86_64 flathub org.freedesktop.Sdk.Extension.rust-stable//24.08
 
 %ifarch aarch64
-%global platform_commit ad3083106a88505c4a1f0e2bd5fca844b8cb967bd5b96f523c5be979f9d46750
-%global sdk_commit 50add9eb717cd1e60a28f575c3cd12965942aea892b335f1eaae8c0c6dce48f1
+%global platform_commit 60eb612ea76ec9c849643df295cdc353e8aae3d6aee799d834484eb3234cd140
+%global sdk_commit fa70dcf88893d9b3644a10ade464f1f91ca99189a81e107aab93327f614954ed
 %global llvm_commit 397caa18dc7859e935316eadd8116cb6b541e30e37e7165925021432d8c850a4
+%global rust_commit 1a2c9eb81860e8efadd6f01d0da090f1fff3cbbdd9da87cc93f54313ea17f813
 %endif
 
 %ifarch x86_64
-%global platform_commit 3eead0add96eea28fd9115c3e49eff55503edf7b2d1c543bc16d89a35fcddfb8
-%global sdk_commit c18a20191586d7bad6c0e071a6d3e0606e480dfd4b74e9c33a33cb36ceb5b19f
+%global platform_commit 4032cef5b0b698b46df684fc68527252cb7350f39bd90b25bb0c79766911de23
+%global sdk_commit c452562271263c5cf32cec693f20a99f77c0771d9a13f607991984e927f0a602
 %global llvm_commit b4df7e54e59a4121693c0b2bbdf01f1baff078eaa4f53410124f6fdad69596f7
+%global rust_commit 90814be2396ce8bec31982cf0ce8bf9bd9901e02ae6630be602ae80005a8caea
 %endif
 
 Name:           fdo-sdk-%{branch}-flatpak
@@ -47,6 +51,13 @@ Summary:        Flatpak Freedesktop SDK llvm%{llvm_major} extension
 %description -n fdo-sdk-extension-llvm%{llvm_major}-%{branch}-flatpak
 %{summary}.
 
+%package -n fdo-sdk-extension-rust-stable-%{branch}-flatpak
+Version:        %{rust_version}
+Summary:        Flatpak Freedesktop SDK rust-stable extension
+
+%description -n fdo-sdk-extension-rust-stable-%{branch}-flatpak
+%{summary}.
+
 %prep
 flatpak remote-add --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
 flatpak remote-modify --user --collection-id=org.flathub.Stable flathub
@@ -58,12 +69,15 @@ flatpak install --assumeyes --no-deps --no-related --user flathub org.freedeskto
 flatpak update --assumeyes --no-deps --no-related --user --commit=%{sdk_commit} org.freedesktop.Sdk//%{branch}
 flatpak install --assumeyes --no-deps --no-related --user flathub org.freedesktop.Sdk.Extension.llvm%{llvm_major}//%{branch}
 flatpak update --assumeyes --no-deps --no-related --user --commit=%{llvm_commit} org.freedesktop.Sdk.Extension.llvm%{llvm_major}//%{branch}
+flatpak install --assumeyes --no-deps --no-related --user flathub org.freedesktop.Sdk.Extension.rust-stable//%{branch}
+flatpak update --assumeyes --no-deps --no-related --user --commit=%{rust_commit} org.freedesktop.Sdk.Extension.rust-stable//%{branch}
 
 %install
-mkdir -p %{buildroot}%{_datadir}/flatpak-sideload/{fdo-sdk,fdo-runtime,fdo-sdk-extension-llvm%{llvm_major}}-%{branch}
+mkdir -p %{buildroot}%{_datadir}/flatpak-sideload/{fdo-sdk,fdo-runtime,fdo-sdk-extension-llvm%{llvm_major},fdo-sdk-extension-rust-stable}-%{branch}
 flatpak create-usb --user %{buildroot}%{_datadir}/flatpak-sideload/fdo-sdk-%{branch} org.freedesktop.Sdk//%{branch}
 flatpak create-usb --user %{buildroot}%{_datadir}/flatpak-sideload/fdo-runtime-%{branch} org.freedesktop.Platform//%{branch}
 flatpak create-usb --user %{buildroot}%{_datadir}/flatpak-sideload/fdo-sdk-extension-llvm%{llvm_major}-%{branch} org.freedesktop.Sdk.Extension.llvm%{llvm_major}//%{branch}
+flatpak create-usb --user %{buildroot}%{_datadir}/flatpak-sideload/fdo-sdk-extension-rust-stable-%{branch} org.freedesktop.Sdk.Extension.rust-stable//%{branch}
 
 %files
 %{_datadir}/flatpak-sideload/fdo-sdk-%branch
@@ -74,7 +88,14 @@ flatpak create-usb --user %{buildroot}%{_datadir}/flatpak-sideload/fdo-sdk-exten
 %files -n fdo-sdk-extension-llvm%{llvm_major}-%{branch}-flatpak
 %{_datadir}/flatpak-sideload/fdo-sdk-extension-llvm%{llvm_major}-%branch
 
+%files -n fdo-sdk-extension-rust-stable-%{branch}-flatpak
+%{_datadir}/flatpak-sideload/fdo-sdk-extension-rust-stable-%branch
+
 %changelog
+* Fri Dec 06 2024 Asahi Lina <lina@asahilina.net> - 24.08.6-1
+- Add rust-stable extension
+- Bump to fdo-sdk 24.08.6
+
 * Wed Sep 25 2024 Janne Grunau <j@jannau.net> - 24.08.2-1
 - Update to fdo-sdk 24.08.02
 

