gnome-session/gnome-session.spec

233 lines
8.2 KiB
RPMSpec

#
# spec file for package gnome-session
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
Name: gnome-session
Version: 3.2.1
Release: 1
License: GPLv2+
Summary: Session Tools for the GNOME Desktop
Url: http://www.gnome.org
Group: System/GUI/GNOME
Source: http://download.gnome.org/sources/gnome-session/3.2/%{name}-%{version}.tar.bz2
Source1: gnome
Source2: gnome.desktop
# Temporarly needed until we get upstream to ship the right icon for suspend
Source7: gnome-session-sleep.svg
# PATCH-FIX-UPSTREAM gnome-session-ice-auth-for-suid.patch hpj@novell.com -- Carries ICE auth over to other UIDs in this session using an env var.
Patch0: gnome-session-ice-auth-for-suid.patch
# PATCH-FIX-UPSTREAM gnome-session-kdm-support.patch hpj@novell.com -- Adds support for KDM logout commands.
Patch1: gnome-session-kdm-support.patch
# PATCH-NEEDS-REBASE gnome-session-wm-switch.patch bnc180506 danw@novell.com -- Fixes legacy sessions to use gnome-wm instead of metacity/compiz. Legacy sessions are not really supported anymore -- do we need to handle a similar case for current saved sessions, though? (was PATCH-FIX-OPENSUSE)
Patch2: gnome-session-wm-switch.patch
# PATCH-NEEDS-REBASE gnome-session-bgo507101-tile-ui.patch bgo507101 vuntz@novell.com -- Tile UI for logout dialog. (Was: PATCH-FIX-UPSTREAM)
Patch3: gnome-session-bgo507101-tile-ui.patch
BuildRequires: fdupes
BuildRequires: gnome-common
BuildRequires: gnome-patch-translation
BuildRequires: hicolor-icon-theme
BuildRequires: intltool
BuildRequires: tcpd-devel
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(gconf-2.0)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(json-glib-1.0) >= 0.10
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(upower-glib)
BuildRequires: pkgconfig(xau)
BuildRequires: pkgconfig(xcomposite)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xrender)
BuildRequires: pkgconfig(xtst)
Requires: %{name}-core = %{version}
Requires: %{name}-default-session = %{version}
Recommends: %{name}-lang
Obsoletes: gnome-core
# There's no splash anymore, so no branding package.
Provides: %{name}-branding = %{version}
Obsoletes: %{name}-branding < %{version}
# Obsolete helpers that were in subpackages and that have been removed
Obsoletes: gnome-session-gtk1-support <= 2.31
Obsoletes: gnome-session-splash <= 2.31
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package provides the basic session tools, like session management
functionality, for the GNOME Desktop.
%package default-session
License: GPLv2+
Summary: Session Manager for GNOME -- Default GNOME Session
Group: System/GUI/GNOME
Requires: %{name} = %{version}
Requires: gnome-shell
Requires: gnome-settings-daemon
Recommends: %{name}-fallback-session
%description default-session
This package contains the definition of the default GNOME session.
%package fallback-session
License: GPLv2+
Summary: Session Manager for GNOME -- Fallback GNOME Session
Group: System/GUI/GNOME
Requires: %{name} = %{version}
Requires: gnome-panel
Requires: gnome-settings-daemon
Requires: metacity
Requires: notification-daemon
%description fallback-session
This package contains the definition of the fallback GNOME session,
which is used when the graphics are not hardware-accelerated.
%package -n gnome2-look-and-feel
Summary: GNOME Desktop with the GNOME 2 Look and Feel
Group: System/GUI/GNOME
Requires: %{name}-fallback-session
%description -n gnome2-look-and-feel
This package contains the definition to choose in the display manager
a GNOME 3 session that looks and feels like GNOME 2.
%package core
License: GPLv2+
Summary: Session Manager for GNOME -- Minimal Version
Group: System/GUI/GNOME
Requires: ConsoleKit
Requires: dbus-1-x11
Requires: gsettings-desktop-schemas >= 0.1.7
Requires: hicolor-icon-theme
%glib2_gsettings_schema_requires
%description core
This package contains a minimal version of gnome-session, that can be
used for specific cases. The gnome-session package is needed for a fully
functional GNOME desktop.
%lang_package
%prep
%setup -q
translation-update-upstream
# disabled unless patches 2 or 3 are enabled
# gnome-patch-translation-prepare
%patch0 -p1
%patch1 -p1
# needs-rebase
#%patch2 -p1
# needs-rebase
#%patch3 -p0
# gnome-patch-translation-update
%build
NOCONFIGURE=1 gnome-autogen.sh
%configure
%__make %{?jobs:-j%jobs} V=1
%install
%makeinstall
%if 0%{?suse_version} <= 1110
%{__rm} %{buildroot}%{_datadir}/locale/ha/LC_MESSAGES/*
%{__rm} %{buildroot}%{_datadir}/locale/ig/LC_MESSAGES/*
%endif
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
# install startup script and xsession file
install -d -m755 %{buildroot}%{_bindir}
install -m755 %SOURCE1 %{buildroot}%{_bindir}/gnome
install -d -m755 %{buildroot}%{_datadir}/xsessions
install -m644 %SOURCE2 %{buildroot}%{_datadir}/xsessions/gnome.desktop
# Install a session file for gnome 2 look-and-feel (fallback mode)
install -m644 %{S:2} %{buildroot}%{_datadir}/xsessions/gnome2-look-and-feel.desktop
sed -i "s/^Exec=.*/Exec=gnome --session gnome-fallback/" %{buildroot}%{_datadir}/xsessions/gnome2-look-and-feel.desktop
install -m644 %{S:7} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
%suse_update_desktop_file session-properties X-SuSE-ControlCenter-Personal
%suse_update_desktop_file %{buildroot}%{_datadir}/xsessions/gnome.desktop
%suse_update_desktop_file -N "GNOME 2 Look and Feel" %{buildroot}%{_datadir}/xsessions/gnome2-look-and-feel.desktop
%find_lang %{name}-3.0 %{?no_lang_C}
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%post core
%glib2_gsettings_schema_post
%icon_theme_cache_post
%postun core
%glib2_gsettings_schema_postun
%icon_theme_cache_postun
%files
%defattr (-, root, root)
%{_bindir}/gnome
%{_datadir}/xsessions/gnome.desktop
# gnome-session-properties
%{_bindir}/gnome-session-properties
%{_datadir}/applications/session-properties.desktop
%{_datadir}/icons/hicolor/*/apps/session-properties.*
%{_datadir}/gnome-session/session-properties.ui
%doc %{_mandir}/man1/gnome-session-properties.1%{?ext_man}
%files default-session
%defattr (-, root, root)
%{_datadir}/gnome-session/sessions/gnome.session
%files fallback-session
%defattr (-, root, root)
%{_datadir}/gnome-session/sessions/gnome-fallback.session
%files -n gnome2-look-and-feel
%defattr(-, root, root)
%{_datadir}/xsessions/gnome2-look-and-feel.desktop
%files core
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/gnome-session
%{_bindir}/gnome-session-quit
# Helper for the session definitions, to know if hardware is accelerated
%{_libexecdir}/gnome-session-check-accelerated
%{_libexecdir}/gnome-session-check-accelerated-helper
%{_datadir}/GConf/gsettings/gnome-session.convert
%{_datadir}/glib-2.0/schemas/org.gnome.SessionManager.gschema.xml
%dir %{_datadir}/gnome-session
%dir %{_datadir}/gnome-session/sessions
%{_datadir}/gnome-session/gsm-inhibit-dialog.ui
%{_datadir}/icons/hicolor/scalable/apps/gnome-session-sleep.svg
%doc %{_mandir}/man1/gnome-session.1*
%doc %{_mandir}/man1/gnome-session-quit.1*
%files lang -f %{name}-3.0.lang
%changelog