%global extension dynamic-panel-transparency %global uuid %{extension}@rockon999.github.io %global forgeurl https://github.com/ewlsh/dynamic-panel-transparency %global commit 0800c0a921bb25f51f6a5ca2e6981b1669a69aec %global date 20201006 %forgemeta Name: gnome-shell-extension-%{extension} Version: 35 Release: 2%{?dist} Summary: GNOME Shell extension for dynamic panel transparency License: GPLv2 URL: %{forgeurl} Source0: %{forgesource} BuildArch: noarch Requires: gnome-shell-extension-common Recommends: gnome-extensions-app %description This extension fades your top panel to nothingness when there are no maximized windows present. Never again will the panel be abruptly darkened! %prep %forgesetup # remove demo gif rm -r %{uuid}/media # remove duplicate license files rm %{uuid}/COPYING %{uuid}/LICENSE # relocate things we don't want copied into the extensions directory mv %{uuid}/locale . mv %{uuid}/schemas . %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/%{uuid}.gschema.xml # install locale files for mo in locale/*/LC_MESSAGES/*.mo; do install -D -p -m 0644 $mo %{buildroot}%{_datadir}/$mo done %find_lang %{extension} # https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/#_scriptlet_to_replace_a_directory %pretrans -p path = "%{_datadir}/gnome-shell/extensions/%{uuid}/prefs.js" st = posix.stat(path) if st and st.type == "directory" then status = os.rename(path, path .. ".rpmmoved") if not status then suffix = 0 while not status do suffix = suffix + 1 status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) end os.rename(path, path .. ".rpmmoved") end end %files -f %{extension}.lang %license COPYING %doc README.md %{_datadir}/gnome-shell/extensions/%{uuid} %{_datadir}/glib-2.0/schemas/%{uuid}.gschema.xml # https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/#_scriptlet_to_replace_a_directory %ghost %{_datadir}/gnome-shell/extensions/%{uuid}/prefs.js.rpmmoved %changelog * Sun Oct 25 2020 Carl George - 35-2.20201006git0800c0a - Handle prefs.js change from directory to file * Sun Oct 25 2020 Carl George - 35-1.20201006git0800c0a - Latest upstream * Sat Aug 29 2020 Carl George - 33-1.20200703gitcd0e7eb - Initial package