## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %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 extension sound-output-device-chooser %global uuid %{extension}@kgshank.net # https://github.com/kgshank/gse-sound-output-device-chooser/commit/fe56bb39c54ea3bde2c3f89f6529075ccf6ce5a4 %global commit0 7b7c66f46d0263908f665419a47de86ee421ee5f %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global gitdate 20240907 Name: gnome-shell-extension-%{extension} Version: 47 Release: %autorelease Summary: GNOME Shell extension for selecting sound devices License: GPL-3.0-or-later BuildArch: noarch URL: https://github.com/kgshank/gse-sound-output-device-chooser #Source: %%{url}/archive/%%{version}/%%{extension}-%%{version}.tar.gz Source0: %url/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz BuildRequires: gettext Requires: gnome-shell Requires: python3 Recommends: gnome-extensions-app %description Shows a list of sound output and input devices (similar to gnome sound settings) in the status menu below the volume slider. Various active ports like HDMI, speakers, etc. of the same device are also displayed for selection. %prep #%%autosetup -n gse-%{extension}-%{version} -p 1 %autosetup -n gse-%{extension}-%{commit0} -p 1 # relocate things we don't want copied into the extensions directory mv %{uuid}/locale . mv %{uuid}/schemas . # fix wrong-file-end-of-line-encoding rpmlint warning sed -e 's/\r$//' -i CHANGELOG.md %install install -d -m 0755 %{buildroot}%{_datadir}/gnome-shell/extensions # install main extension files cp -r --preserve=mode,timestamps %{uuid} %{buildroot}%{_datadir}/gnome-shell/extensions # install the schema file install -D -p -m 0644 \ schemas/org.gnome.shell.extensions.%{extension}.gschema.xml \ %{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.%{extension}.gschema.xml # install locale files for po in locale/*/LC_MESSAGES/*.po; do install -d -m 0755 %{buildroot}%{_datadir}/$(dirname $po) msgfmt --output-file %{buildroot}%{_datadir}/${po%.po}.mo $po done %find_lang %{extension} %files -f %{extension}.lang %license LICENSE %doc README.md CHANGELOG.md %{_datadir}/gnome-shell/extensions/%{uuid} %{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.%{extension}.gschema.xml %changelog * Wed Nov 06 2024 Martin Gansser - 47-1 - initial build