File gnome-session.spec of Package gnome-session

# spec file for package gnome-session
# Copyright (c) 2016 SUSE LINUX 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

Name:           gnome-session
Version:        3.20.2
Release:        0
Summary:        Session Tools for the GNOME Desktop
License:        GPL-2.0+
Group:          System/GUI/GNOME
Source1:        gnome
Source2:        gnome.desktop
# PATCH-FIX-SLE gnome-session-ice-auth-for-suid.patch -- Carries ICE auth over to other UIDs in this session using an env var.
Patch0:         gnome-session-ice-auth-for-suid.patch
# PATCH-FEATURE-UPSTREAM gnome-session-logging-to-systemd-journal-configurable.patch bsc#876685 bgo#768982 -- Add a new configure switch for systemd journal support.
Patch1:         gnome-session-logging-to-systemd-journal-configurable.patch
# PATCH-FIX-UPSTREAM gnome-session-check-dbus-update-activation-environment.patch bsc#993342 bgo#768036 -- Check existence of dbus-update-activation-environment before calling it to avoid warnings.
Patch2:         gnome-session-check-dbus-update-activation-environment.patch
# PATCH-FIX-UPSTREAM gnome-session-bsc979257-bgo728151-duplicated-poweroff-dialog.patch bsc#979257 bgo#728151 - Don't pop up a second Power Off dialog when pressing Ctrl-Alt-Del
Patch3:         gnome-session-bsc979257-bgo728151-duplicated-poweroff-dialog.patch
BuildRequires:  autoconf
BuildRequires:  fdupes
BuildRequires:  intltool
BuildRequires:  tcpd-devel
%if !0%{?is_opensuse}
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  xsltproc
BuildRequires:  pkgconfig(dbus-glib-1) >= 0.76
BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.35.0
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(glib-2.0) >= 2.35.0
BuildRequires:  pkgconfig(gnome-desktop-3.0) >= 3.9.91
BuildRequires:  pkgconfig(gtk+-3.0) >= 2.90.7
BuildRequires:  pkgconfig(ice)
BuildRequires:  pkgconfig(json-glib-1.0) >= 0.10
BuildRequires:  pkgconfig(libsystemd) >= 209
BuildRequires:  pkgconfig(sm)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xau)
BuildRequires:  pkgconfig(xcomposite)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xrender)
BuildRequires:  pkgconfig(xtrans)
BuildRequires:  pkgconfig(xtst)
Requires:       %{name}-core = %{version}
Requires:       %{name}-default-session = %{version}
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This package provides the basic session tools, like session management
functionality, for the GNOME Desktop.

%package default-session
Summary:        Session Manager for GNOME -- Default GNOME Session
Group:          System/GUI/GNOME
Requires:       %{name} = %{version}
Requires:       gnome-settings-daemon
Requires:       gnome-shell

%description default-session
This package contains the definition of the default GNOME session.

%package wayland
Summary:        Session Manager for GNOME -- Wayland session
Group:          System/GUI/GNOME
Requires:       %{name} = %{version}
Requires:       gnome-settings-daemon
Requires:       xorg-x11-server-wayland

%description wayland
This package contains the definition of the default GNOME session on Wayland.

%package core
Summary:        Session Manager for GNOME -- Minimal Version
Group:          System/GUI/GNOME
Requires:       dbus-1-x11
Requires:       gsettings-desktop-schemas >= 0.1.7
Requires:       hicolor-icon-theme

%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.


%setup -q
%if !0%{?is_opensuse}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

%configure \
        --enable-systemd \
%if !0%{?is_opensuse}
        --disable-systemd-journal \
make %{?_smp_mflags} V=1

make DESTDIR=%{buildroot} install %{?_smp_mflags}
# 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
%suse_update_desktop_file %{buildroot}%{_datadir}/xsessions/gnome.desktop
%find_lang %{name}-3.0 %{?no_lang_C}
%fdupes %{buildroot}



%post core

%postun core

%defattr (-, root, root)
# XOrg session is again default, hence this is disabled for now.

%files default-session
%defattr (-, root, root)

%files wayland
%defattr (-, root, root)
%dir %{_datadir}/wayland-sessions
# XOrg session is again default, hence this is disabled for now.

%files core
%defattr (-, root, root)
%dir %{_datadir}/gnome-session
%dir %{_datadir}/gnome-session/sessions
# Helper for the session definitions, to know if hardware is accelerated

%files lang -f %{name}-3.0.lang