From 5123a9e779823dd74b913af9dfdab94b30100ee1 Mon Sep 17 00:00:00 2001 From: Mohamed El Morabity Date: Thu, 16 Feb 2012 03:35:30 +0100 Subject: [PATCH] - Update to 3.3.5 - Spec cleanup --- .gitignore | 1 + ...l-extensions-3.3.5-GSettings_schemas.patch | 72 +++++++++++++++++ gnome-shell-extensions.spec | 78 ++++++++++--------- sources | 2 +- 4 files changed, 114 insertions(+), 39 deletions(-) create mode 100644 gnome-shell-extensions-3.3.5-GSettings_schemas.patch diff --git a/.gitignore b/.gitignore index 5d61e9f..8188a1b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /gnome-shell-extensions-e102c0c6.tar.xz /gnome-shell-extensions-3.2.0.tar.xz /gnome-shell-extensions-3.3.2.tar.xz +/gnome-shell-extensions-3.3.5.tar.xz diff --git a/gnome-shell-extensions-3.3.5-GSettings_schemas.patch b/gnome-shell-extensions-3.3.5-GSettings_schemas.patch new file mode 100644 index 0000000..51454e7 --- /dev/null +++ b/gnome-shell-extensions-3.3.5-GSettings_schemas.patch @@ -0,0 +1,72 @@ +From a4fac964dced50d0fd80b977e773bb150f5cdd9b Mon Sep 17 00:00:00 2001 +From: Giovanni Campagna +Date: Fri, 10 Feb 2012 17:15:31 +0000 +Subject: convenience: allow system-wide installation again + +Check if necessary files are installed in the extension folder +(as done by "make zip-file"), and if not, fallback to the standard +paths. +--- +diff --git a/lib/convenience.js b/lib/convenience.js +index 6421ef5..74c02fb 100644 +--- a/lib/convenience.js ++++ b/lib/convenience.js +@@ -3,6 +3,7 @@ + const Gettext = imports.gettext; + const Gio = imports.gi.Gio; + ++const Config = imports.misc.config; + const ExtensionUtils = imports.misc.extensionUtils; + + /** +@@ -17,8 +18,15 @@ function initTranslations(domain) { + + domain = domain || extension.metadata['gettext-domain']; + +- let localeDir = extension.dir.get_child('locale').get_path(); +- Gettext.bindtextdomain(domain, localeDir); ++ // check if this extension was built with "make zip-file", and thus ++ // has the locale files in a subfolder ++ // otherwise assume that extension has been installed in the ++ // same prefix as gnome-shell ++ let localeDir = extension.dir.get_child('locale'); ++ if (localeDir.query_exists(null)) ++ Gettext.bindtextdomain(domain, localeDir.get_path()); ++ else ++ Gettext.bindtextdomain(domain, Config.LOCALEDIR); + } + + /** +@@ -34,11 +42,26 @@ function getSettings(schema) { + + schema = schema || extension.metadata['settings-schema']; + +- let schemaDir = extension.dir.get_child('schemas').get_path(); +- let schemaSource = Gio.SettingsSchemaSource.new_from_directory(schemaDir, +- Gio.SettingsSchemaSource.get_default(), +- false); ++ const GioSSS = Gio.SettingsSchemaSource; ++ ++ // check if this extension was built with "make zip-file", and thus ++ // has the schema files in a subfolder ++ // otherwise assume that extension has been installed in the ++ // same prefix as gnome-shell (and therefore schemas are available ++ // in the standard folders) ++ let schemaDir = extension.dir.get_child('schemas'); ++ let schemaSource; ++ if (schemaDir.query_exists(null)) ++ schemaSource = GioSSS.new_from_directory(schemaDir.get_path(), ++ GioSSS.get_default(), ++ false); ++ else ++ schemaSource = GioSSS.get_default(); ++ + let schemaObj = schemaSource.lookup(schema, false); ++ if (!schemaObj) ++ throw new Error('Schema ' + schema + ' could not be found for extension ' ++ + extension.metadata.uuid + '. Please check your installation.'); + + return new Gio.Settings({ settings_schema: schemaObj }); + } +-- +cgit v0.9.0.2 diff --git a/gnome-shell-extensions.spec b/gnome-shell-extensions.spec index 2b67b41..30f9692 100644 --- a/gnome-shell-extensions.spec +++ b/gnome-shell-extensions.spec @@ -2,24 +2,27 @@ %global major_version 3.3 Name: gnome-shell-extensions -Version: %{major_version}.2 -Release: 2%{?dist} +Version: %{major_version}.5 +Release: 1%{?dist} Summary: Modify and extend GNOME Shell functionality and behavior Group: User Interface/Desktops License: GPLv2+ URL: http://live.gnome.org/GnomeShell/Extensions -# Using git archive since upstream hasn't released 3.3.2 yet +# Using git archive since upstream hasn't released 3.3.5 yet # $ git clone git://git.gnome.org/gnome-shell-extensions/ # $ cd gnome-shell-extensions/ # $ git archive --format=tar --prefix=%{name}-%{version}/ %{version} | xz > ../%{name}-%{version}.tar.xz Source0: %{name}-%{version}.tar.xz +# Fix GSettings schemas path search +Patch0: %{name}-3.3.5-GSettings_schemas.patch + BuildRequires: glib2-devel BuildRequires: gnome-common BuildRequires: intltool BuildRequires: pkgconfig(gnome-desktop-3.0) BuildRequires: pkgconfig(libgtop-2.0) -Requires: gnome-shell >= %{major_version}.1 +Requires: gnome-shell >= %{major_version}.5 BuildArch: noarch %description @@ -48,7 +51,7 @@ Enabled extensions: Summary: Files common to GNOME Shell Extensions Group: User Interface/Desktops License: GPLv2+ -Requires: gnome-shell >= %{major_version}.2 +Requires: gnome-shell >= %{major_version}.5 Provides: %{name}-common = %{version}-%{release} Obsoletes: %{name}-common < %{version}-%{release} @@ -239,141 +242,140 @@ This extension adds a systems status menu for rotating monitors %prep %setup -q +%patch0 -p1 -b .GSettings_schemas %build # since we build from a git checkout [ -x autogen.sh ] && NOCONFIGURE=1 ./autogen.sh +# TODO: add gajim to the list when enabling it %configure --enable-extensions="alternate-tab alternative-status-menu apps-menu auto-move-windows dock drive-menu native-window-placement places-menu systemMonitor user-theme windowsNavigator workspace-indicator xrandr-indicator" make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT %find_lang %{name} %files -n %{pkg_prefix}-common -f %{name}.lang -%defattr(-,root,root,-) %doc COPYING NEWS README %dir %{_datadir}/gnome-shell/extensions/ %files -n %{pkg_prefix}-alternate-tab -%defattr(-,root,root,-) %{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.alternate-tab.gschema.xml %{_datadir}/gnome-shell/extensions/alternate-tab* %files -n %{pkg_prefix}-alternative-status-menu -%defattr(-,root,root,-) %{_datadir}/gnome-shell/extensions/alternative-status-menu* %files -n %{pkg_prefix}-apps-menu -%defattr(-,root,root,-) %{_datadir}/gnome-shell/extensions/apps-menu* %files -n %{pkg_prefix}-auto-move-windows -%defattr(-,root,root,-) %{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.auto-move-windows.gschema.xml %{_datadir}/gnome-shell/extensions/auto-move-windows* %files -n %{pkg_prefix}-dock -%defattr(-,root,root,-) %{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.dock.gschema.xml %{_datadir}/gnome-shell/extensions/dock* %files -n %{pkg_prefix}-drive-menu -%defattr(-,root,root,-) %{_datadir}/gnome-shell/extensions/drive-menu* - # TODO: uncomment when enabling gajim # %files -n %{pkg_prefix}-gajim -# %defattr(-,root,root,-) # %{_datadir}/gnome-shell/extensions/gajim* %files -n %{pkg_prefix}-native-window-placement -%defattr(-,root,root,-) %{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.native-window-placement.gschema.xml %{_datadir}/gnome-shell/extensions/native-window-placement* %files -n %{pkg_prefix}-places-menu -%defattr(-,root,root,-) %{_datadir}/gnome-shell/extensions/places-menu* %files -n %{pkg_prefix}-systemMonitor -%defattr(-,root,root,-) %{_datadir}/gnome-shell/extensions/systemMonitor* %files -n %{pkg_prefix}-user-theme -%defattr(-,root,root,-) %{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.user-theme.gschema.xml %{_datadir}/gnome-shell/extensions/user-theme* %files -n %{pkg_prefix}-windowsNavigator -%defattr(-,root,root,-) %{_datadir}/gnome-shell/extensions/windowsNavigator* %files -n %{pkg_prefix}-workspace-indicator -%defattr(-,root,root,-) %{_datadir}/gnome-shell/extensions/workspace-indicator* %files -n %{pkg_prefix}-xrandr-indicator -%defattr(-,root,root,-) %{_datadir}/gnome-shell/extensions/xrandr-indicator* -%posttrans -n %{pkg_prefix}-alternate-tab -glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas || : - %postun -n %{pkg_prefix}-alternate-tab -glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +if [ $1 -eq 0 ]; then + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas/ &>/dev/null || : +fi +%posttrans -n %{pkg_prefix}-alternate-tab +/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas/ &>/dev/null || : -%posttrans -n %{pkg_prefix}-auto-move-windows -glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas || : %postun -n %{pkg_prefix}-auto-move-windows -glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +if [ $1 -eq 0 ]; then + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas/ &>/dev/null || : +fi +%posttrans -n %{pkg_prefix}-auto-move-windows +/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas/ &>/dev/null || : -%posttrans -n %{pkg_prefix}-dock -glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas || : %postun -n %{pkg_prefix}-dock -glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +if [ $1 -eq 0 ]; then + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas/ &>/dev/null || : +fi +%posttrans -n %{pkg_prefix}-dock +/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas/ &>/dev/null || : -%posttrans -n %{pkg_prefix}-native-window-placement -glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas || : %postun -n %{pkg_prefix}-native-window-placement -glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +if [ $1 -eq 0 ]; then + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas/ &>/dev/null || : +fi +%posttrans -n %{pkg_prefix}-native-window-placement +/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas/ &>/dev/null || : -%posttrans -n %{pkg_prefix}-user-theme -glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas || : %postun -n %{pkg_prefix}-user-theme -glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +if [ $1 -eq 0 ]; then + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas/ &>/dev/null || : +fi + +%posttrans -n %{pkg_prefix}-user-theme +/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas/ &>/dev/null || : %changelog +* Thu Feb 16 2012 Mohamed El Morabity - 3.3.5-1 +- Update to 3.3.5 +- Spec cleanup + * Fri Jan 13 2012 Fedora Release Engineering - 3.3.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index 16ca75c..affa82d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c8fecca9acd302715c71d8db5b3a6893 gnome-shell-extensions-3.3.2.tar.xz +91dd75db31f6849d849309c234eebdb6 gnome-shell-extensions-3.3.5.tar.xz