diff --git a/gnome-shell-extensions.changes b/gnome-shell-extensions.changes index 5f4e9f7..44d48ca 100644 --- a/gnome-shell-extensions.changes +++ b/gnome-shell-extensions.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Sep 22 08:44:34 UTC 2017 - dimstar@opensuse.org + +- Register SLE-Classic with u-a handler for default.desktop + implementation, which obsoletes the change in + /etc/sysconfig/windowmanager to pick the 'default window manager' + (boo#1039756). + ------------------------------------------------------------------- Mon Sep 18 06:38:10 UTC 2017 - xwang@suse.com diff --git a/gnome-shell-extensions.spec b/gnome-shell-extensions.spec index f714487..028ac37 100644 --- a/gnome-shell-extensions.spec +++ b/gnome-shell-extensions.spec @@ -18,7 +18,6 @@ %global __requires_exclude typelib\\(Meta\\) - Name: gnome-shell-extensions Version: 3.26.0 Release: 0 @@ -41,15 +40,15 @@ Patch3: sle-classic-lock-screen-background.patch Patch1000: gse-sle-classic-ext.patch # Needed because we build a tarball generated with "git archive" BuildRequires: gnome-common -# Needed for directory ownership -BuildRequires: gnome-shell # gobject-introspection is needed for the typelib() rpm magic. BuildRequires: gnome-patch-translation +# Needed for directory ownership +BuildRequires: gnome-shell BuildRequires: gobject-introspection BuildRequires: intltool +BuildRequires: pkgconfig BuildRequires: translation-update-upstream BuildRequires: pkgconfig(gio-2.0) -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %description @@ -92,8 +91,8 @@ menu, and provides the ability to hibernate. This package provides the extensions required to switch to gnome-shell classic and also installs the required session files. - %lang_package -n %{name}-common + %prep %setup -q %if !0%{?is_opensuse} @@ -107,7 +106,7 @@ gnome-patch-translation-prepare ##gnome-patch-translation-update # In openSUSE GNOME, we don't launch gnome-session directly, but wrap this through a shell script, /usr/bin/gnome sed -i "s:Exec=gnome-session:Exec=gnome:g" data/gnome-classic.desktop.in -cp %{S:1} . +cp %{SOURCE1} . %if !0%{?is_opensuse} sed -i -e 's/openSUSE/SUSE Linux Enterprise/g' README.SUSE %endif @@ -126,13 +125,29 @@ make %{?_smp_mflags} %make_install %find_lang %{name} %{?no_lang_C} %if !0%{?is_opensuse} -install -m0644 %{S:2} %{buildroot}/%{_datadir}/xsessions/sle-classic.desktop +install -m0644 %{SOURCE2} %{buildroot}/%{_datadir}/xsessions/sle-classic.desktop # Install SLE theme tar -xzvf %{SOURCE3} install -d %{buildroot}%{_datadir}/gnome-shell/theme cp SLE-theme/theme/* %{buildroot}%{_datadir}/gnome-shell/theme + +# Prepare for 'default.desktop' being update-alternative handled, boo#1039756 +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +touch %{buildroot}%{_sysconfdir}/alternatives/default-xsession.desktop +ln -s %{_sysconfdir}/alternatives/default-xsession.desktop %{buildroot}%{_datadir}/xsessions/default.desktop %endif +%if !0%{?is_opensuse} +%post -n gnome-shell-classic +%{_sbindir}/update-alternatives --install %{_datadir}/xsessions/default.desktop \ + default-xsession.desktop %{_datadir}/xsessions/sle-classic.desktop 30 + +%postun -n gnome-shell-classic +[ -f %{_datadir}/xsessions/sle-classic.desktop ] || %{_sbindir}/update-alternatives \ + --remove default-xsession.desktop %{_datadir}/xsessions/sle-classic.desktop +%endif + + %files common %defattr(-,root,root) %doc COPYING README.SUSE @@ -164,8 +179,10 @@ cp SLE-theme/theme/* %{buildroot}%{_datadir}/gnome-shell/theme %{_datadir}/gnome-shell/theme/gnome-classic-high-contrast.css %{_datadir}/xsessions/gnome-classic.desktop %if !0%{?is_opensuse} +%{_datadir}/xsessions/default.desktop %{_datadir}/xsessions/sle-classic.desktop %{_datadir}/gnome-shell/theme/sle-background.png +%ghost %{_sysconfdir}/alternatives/default-xsession.desktop %endif %files common-lang -f %{name}.lang