From 0dce094dc72f4d99f66b7a54e093c2133b48c180 Mon Sep 17 00:00:00 2001 From: june <159748074+june-fish@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:16:49 -0600 Subject: [PATCH] initial package for gnome-shell-extension-gpu-switcher-supergfxctl (#6917) * initial package for gnome-shell-extension-gpu-switcher-supergfxctl * add %doc README.md * only build x86_64 Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * remove noarch Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * for some reason it doesn't build unless it's noarch lol Signed-off-by: Owen-sz --------- Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Signed-off-by: Owen-sz Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Co-authored-by: Owen-sz (cherry picked from commit 2b6424fd55aa99ca2b8e27a6ff391a08a2ec2edf) --- .../anda.hcl | 6 +++ ...hell-extension-gpu-supergfxctl-switch.spec | 39 +++++++++++++++++++ .../update.rhai | 9 +++++ 3 files changed, 54 insertions(+) create mode 100644 anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/anda.hcl create mode 100644 anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/gnome-shell-extension-gpu-supergfxctl-switch.spec create mode 100644 anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/update.rhai diff --git a/anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/anda.hcl b/anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/anda.hcl new file mode 100644 index 0000000000..3870cb13d0 --- /dev/null +++ b/anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "gnome-shell-extension-gpu-supergfxctl-switch.spec" + } +} diff --git a/anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/gnome-shell-extension-gpu-supergfxctl-switch.spec b/anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/gnome-shell-extension-gpu-supergfxctl-switch.spec new file mode 100644 index 0000000000..fc3de66afd --- /dev/null +++ b/anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/gnome-shell-extension-gpu-supergfxctl-switch.spec @@ -0,0 +1,39 @@ +%global commit 1de26db2ea4166fdca85306300b12bdc24f2c955 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250925 +%global ver 11 +%global extension gpu-switcher-supergfxctl +%global uuid %{extension}@chikobara.github.io + +Name: gnome-shell-extension-%{extension} +Version: %ver^%commit_date.%shortcommit +Release: 1%?dist +Summary: GPU Profile switcher Gnome-Shell-Extension for ASUS laptops using Supergfxctl +License: GPL-3.0-only +URL: https://github.com/chikobara/GPU-Switcher-Supergfxctl + +Source0: %url/archive/%commit.tar.gz + +Requires: (gnome-shell >= 48~ with gnome-shell < 50~) asusctl supergfxctl +Recommends: gnome-extensions-app + +BuildArch: noarch + +%description +GPU Profile switcher Gnome-Shell-Extension for ASUS laptops using Supergfxctl + +%prep +%autosetup -n GPU-Switcher-Supergfxctl-%{commit} -p1 + +%install +install -Dm644 metadata.json %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/metadata.json +install -Dm644 extension.js %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/extension.js + +%files +%license LICENSE +%doc README.md +%{_datadir}/gnome-shell/extensions/%{uuid} + +%changelog +* Mon Oct 27 2025 june-fish - 11 +- Initial Package diff --git a/anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/update.rhai b/anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/update.rhai new file mode 100644 index 0000000000..10ce2bdccd --- /dev/null +++ b/anda/desktops/gnome/gnome-shell-extension-gpu-supergfxctl-switch/update.rhai @@ -0,0 +1,9 @@ +if filters.contains("nightly") { + rpm.global("commit", gh_commit("chikobara/GPU-Switcher-Supergfxctl")); + if rpm.changed() { + let v = find("\"version\": ([.\\d]+)\n", gh_rawfile("chikobara/GPU-Switcher-Supergfxctl", "main", "metadata.json"), 1); + rpm.global("ver", v); + rpm.global("commit_date", date()); + rpm.release(); + } +}