gnome-shell-extensions/gnome-shell-extensions.spec
Dominique Leuenberger 2c22c2467c Accepting request 535094 from home:xiaoguang_wang:branches:GNOME:Factory
- Add sle-classic-xorg.desktop file.
  Allow user to open X session or wayland session (bsc#1062909).
- Add default.desktop file in '{_datadir}/wayland-sessions/'
  Make default.desktop session working on wayland (bsc#1062196).

- Update gnome-shell-add-app-to-desktop.patch, allow app
  shortcut added to desktop could be executed with default

OBS-URL: https://build.opensuse.org/request/show/535094
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell-extensions?expand=0&rev=145
2017-10-20 14:36:27 +00:00

205 lines
8.9 KiB
RPMSpec

#
# spec file for package gnome-shell-extensions
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Dominique Leuenberger, Amsterdam, The Netherlands
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%global __requires_exclude typelib\\(Meta\\)
Name: gnome-shell-extensions
Version: 3.26.1
Release: 0
Summary: A collection of extensions for GNOME Shell
License: GPL-2.0+
Group: System/GUI/GNOME
Url: http://live.gnome.org/GnomeShell/Extensions
Source: http://download.gnome.org/sources/gnome-shell-extensions/3.26/%{name}-%{version}.tar.xz
Source1: README.SUSE
Source2: sle-classic.desktop
Source3: SLE-theme.tar.gz
Source4: sle-classic-xorg.desktop
# PATCH-FEATURE-SLE gnome-shell-add-app-to-desktop.patch bnc#870580 dliang@suse.com -- allow adding app shortcut to desktop easily.
Patch1: gnome-shell-add-app-to-desktop.patch
# PATCH-FEATURE-SLE sle-classic-favorites-menu-at-end.patch bnc#890989 cxiong@suse.com -- put the favorites at the end of the app catogories for accessibility reason -- cxiong@suse.com bnc#890989
Patch2: sle-classic-favorites-menu-at-end.patch
# PATCH-FEATURE-SLE sle-classic-lock-screen-background.patch bsc#1007468 xwang@suse.com -- add SUSE logo on lock screen when auth is requested
Patch3: sle-classic-lock-screen-background.patch
## NOTE keep SLE Classic patch at the bottom
# PATCH-FIX-SLE gse-sle-classic-ext.patch Fate#318572 cxiong@suse.com -- add sle classic support
Patch1000: gse-sle-classic-ext.patch
# Needed because we build a tarball generated with "git archive"
BuildRequires: gnome-common
# 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)
BuildArch: noarch
%description
GNOME Shell Extensions is a collection of extensions providing
additional and optional functionality to GNOME Shell.
%package common
Summary: Common files for GNOME Shell extensions
Group: System/GUI/GNOME
Requires: gnome-shell
Recommends: %{name}-common-lang
# Obsoletes for metapackage and extensions from gnome-shell-extensions that we used to package
Obsoletes: gnome-shell-extension-alternate-tab < %{version}
Obsoletes: gnome-shell-extension-apps-menu < %{version}
Obsoletes: gnome-shell-extension-auto-move-windows < %{version}
Obsoletes: gnome-shell-extension-dock
Obsoletes: gnome-shell-extension-drive-menu < %{version}
Obsoletes: gnome-shell-extension-gajim < %{version}
Obsoletes: gnome-shell-extension-native-window-placement < %{version}
Obsoletes: gnome-shell-extension-places-menu < %{version}
Obsoletes: gnome-shell-extension-systemMonitor < %{version}
Obsoletes: gnome-shell-extension-user-theme < %{version}
Obsoletes: gnome-shell-extension-windows-navigator < %{version}
Obsoletes: gnome-shell-extension-workspace-indicator < %{version}
Obsoletes: gnome-shell-extension-xrandr-indicator < %{version}
Obsoletes: gnome-shell-extensions < %{version}
%description common
This package provides files common to several GNOME Shell Extensions
%package -n gnome-shell-classic
Summary: A collection of extensions for Gnome-shell classic
Group: System/GUI/GNOME
Recommends: %{name}-common-lang
%description -n gnome-shell-classic
This GNOME Shell extension adds a power off item in the status
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}
translation-update-upstream
gnome-patch-translation-prepare
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch1000 -p1
%endif
##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 %{SOURCE1} .
%if !0%{?is_opensuse}
sed -i -e 's/openSUSE/SUSE Linux Enterprise/g' README.SUSE
%endif
%build
CLASSIC_EXTENSIONS=$(awk -F\" '/^CLASSIC_EXTENSIONS=/{ print $2 }' configure.ac)
%if !0%{?is_opensuse}
CLASSIC_EXTENSIONS="${CLASSIC_EXTENSIONS} workspace-indicator"
%endif
%configure \
--enable-classic-mode \
--enable-extensions="$CLASSIC_EXTENSIONS"
make %{?_smp_mflags}
%install
%make_install
%find_lang %{name} %{?no_lang_C}
%if !0%{?is_opensuse}
install -m0644 %{SOURCE2} %{buildroot}/%{_datadir}/xsessions/sle-classic.desktop
install -m0644 %{SOURCE4} %{buildroot}/%{_datadir}/xsessions/sle-classic-xorg.desktop
install -d -m755 %{buildroot}%{_datadir}/wayland-sessions
install -m0644 %{SOURCE2} %{buildroot}/%{_datadir}/wayland-sessions/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
touch %{buildroot}%{_sysconfdir}/alternatives/default-waylandsession.desktop
ln -s %{_sysconfdir}/alternatives/default-waylandsession.desktop %{buildroot}%{_datadir}/wayland-sessions/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
%{_sbindir}/update-alternatives --install %{_datadir}/wayland-sessions/default.desktop \
default-waylandsession.desktop %{_datadir}/wayland-sessions/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
[ -f %{_datadir}/wayland-sessions/sle-classic.desktop ] || %{_sbindir}/update-alternatives \
--remove default-waylandsession.desktop %{_datadir}/wayland-sessions/sle-classic.desktop
%endif
%files common
%defattr(-,root,root)
%doc COPYING README.SUSE
%files -n gnome-shell-classic
%defattr(-,root,root)
%doc COPYING
%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.classic-overrides.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.window-list.gschema.xml
%{_datadir}/gnome-session/sessions/gnome-classic.session
%{_datadir}/gnome-shell/extensions/alternate-tab@gnome-shell-extensions.gcampax.github.com/
%{_datadir}/gnome-shell/extensions/apps-menu@gnome-shell-extensions.gcampax.github.com/
%{_datadir}/gnome-shell/extensions/launch-new-instance@gnome-shell-extensions.gcampax.github.com/
%{_datadir}/gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/
%if !0%{?is_opensuse}
%{_datadir}/gnome-shell/extensions/workspace-indicator@gnome-shell-extensions.gcampax.github.com/
%endif
%{_datadir}/gnome-shell/extensions/window-list@gnome-shell-extensions.gcampax.github.com/
%dir %{_datadir}/gnome-shell/modes
%{_datadir}/gnome-shell/modes/classic.json
%dir %{_datadir}/gnome-shell/theme/
%{_datadir}/gnome-shell/theme/calendar-today.svg
%{_datadir}/gnome-shell/theme/classic-process-working.svg
%{_datadir}/gnome-shell/theme/classic-toggle-off-intl.svg
%{_datadir}/gnome-shell/theme/classic-toggle-off-us.svg
%{_datadir}/gnome-shell/theme/classic-toggle-on-intl.svg
%{_datadir}/gnome-shell/theme/classic-toggle-on-us.svg
%{_datadir}/gnome-shell/theme/gnome-classic.css
%{_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}/xsessions/sle-classic-xorg.desktop
%dir %{_datadir}/wayland-sessions
%{_datadir}/wayland-sessions/default.desktop
%{_datadir}/wayland-sessions/sle-classic.desktop
%{_datadir}/gnome-shell/theme/sle-background.png
%ghost %{_sysconfdir}/alternatives/default-xsession.desktop
%ghost %{_sysconfdir}/alternatives/default-waylandsession.desktop
%endif
%files common-lang -f %{name}.lang
%changelog