Skip to content

Commit 2b6424f

Browse files
june-fishOwen-sz
andauthored
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 <owen@fyralabs.com> --------- Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Signed-off-by: Owen-sz <owen@fyralabs.com> Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Co-authored-by: Owen-sz <owen@fyralabs.com>
1 parent 0b4f4a7 commit 2b6424f

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
project pkg {
2+
arches = ["x86_64"]
3+
rpm {
4+
spec = "gnome-shell-extension-gpu-supergfxctl-switch.spec"
5+
}
6+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
%global commit 1de26db2ea4166fdca85306300b12bdc24f2c955
2+
%global shortcommit %(c=%{commit}; echo ${c:0:7})
3+
%global commit_date 20250925
4+
%global ver 11
5+
%global extension gpu-switcher-supergfxctl
6+
%global uuid %{extension}@chikobara.github.io
7+
8+
Name: gnome-shell-extension-%{extension}
9+
Version: %ver^%commit_date.%shortcommit
10+
Release: 1%?dist
11+
Summary: GPU Profile switcher Gnome-Shell-Extension for ASUS laptops using Supergfxctl
12+
License: GPL-3.0-only
13+
URL: https://github.com/chikobara/GPU-Switcher-Supergfxctl
14+
15+
Source0: %url/archive/%commit.tar.gz
16+
17+
Requires: (gnome-shell >= 48~ with gnome-shell < 50~) asusctl supergfxctl
18+
Recommends: gnome-extensions-app
19+
20+
BuildArch: noarch
21+
22+
%description
23+
GPU Profile switcher Gnome-Shell-Extension for ASUS laptops using Supergfxctl
24+
25+
%prep
26+
%autosetup -n GPU-Switcher-Supergfxctl-%{commit} -p1
27+
28+
%install
29+
install -Dm644 metadata.json %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/metadata.json
30+
install -Dm644 extension.js %{buildroot}%{_datadir}/gnome-shell/extensions/%{uuid}/extension.js
31+
32+
%files
33+
%license LICENSE
34+
%doc README.md
35+
%{_datadir}/gnome-shell/extensions/%{uuid}
36+
37+
%changelog
38+
* Mon Oct 27 2025 june-fish <june@fyralabs.com> - 11
39+
- Initial Package
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
if filters.contains("nightly") {
2+
rpm.global("commit", gh_commit("chikobara/GPU-Switcher-Supergfxctl"));
3+
if rpm.changed() {
4+
let v = find("\"version\": ([.\\d]+)\n", gh_rawfile("chikobara/GPU-Switcher-Supergfxctl", "main", "metadata.json"), 1);
5+
rpm.global("ver", v);
6+
rpm.global("commit_date", date());
7+
rpm.release();
8+
}
9+
}

0 commit comments

Comments
 (0)