File mate-session-manager.spec of Package mate-session-manager

#
# spec file for mate-session-manager
#
# Copyright (c) 2014 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:           mate-session-manager
Version:        1.8.1
Release:        0
License:        GPL-2.0+
Summary:        MATE Session Manager
Url:            http://mate-desktop.org/
Group:          System/GUI/Other
Source0:        http://pub.mate-desktop.org/releases/1.8/%{name}-%{version}.tar.xz
# Not upstream file. Only proposes upstream packages:
Source1:        mate-session-manager-upstream-mate_defaults.conf
# Some documentation for people writing branding packages, shipped in the branding-upstream package
Source2:        README.Gsettings-overrides
# PATCH-FIX-UPSTREAM  mate-session-manager-check-for-X11-libraries.patch --remove pangox of configure script as
# mate-session-manager doesn't build against it
Patch0:         mate-session-manager-check-for-X11-libraries.patch
%glib2_gsettings_schema_requires


BuildRequires:  hicolor-icon-theme
BuildRequires:  mate-common
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(ice)
BuildRequires:  pkgconfig(sm)
BuildRequires:  pkgconfig(xau)
BuildRequires:  pkgconfig(xext)
BuildRequires:  systemd-devel
BuildRequires:  update-desktop-files
Requires:       %{name}-branding = %{version}
Recommends:     %{name}-lang

%description
This package contains a session that can be started from a display
manager such as MDM. It will load all necessary applications for a
full-featured user session.

%package branding-upstream
Summary:        Upstream definitions of default settings and applications
Group:          System/Libraries
Requires:       %{name} = %{version}
Provides:       %{name}-branding = %{version}
Conflicts:      otherproviders(%{name}-branding)
Supplements:    packageand(%{name}:branding-upstream)
BuildArch:      noarch
#BRAND: The /etc/mate_defaults.conf allows to define arbitrary
#BRAND: applications as preferred defaults.
#BRAND: A /usr/share/glib-2.0/schemas/$NAME.gschema.override file can
#BRAND: be used to override the default value for GSettings keys. See
#BRAND: README.Gsettings-overrides for more details. The branding
#BRAND: package should then have proper Requires for features changed
#BRAND: with such an override file.

%description -n mate-session-manager-branding-upstream
This package provides upstream defaults for settings stored with
GSettings and applications used by the MIME system.

%lang_package

%prep
%setup -q
%patch0 -p1
cp -a %{SOURCE2} .
cp -a %{SOURCE1} mate_defaults.conf

%build
autoreconf -fiv
%configure --disable-upower                                             \
   --disable-static                                                     \
   --enable-ipv6                                                        \
   --with-default-wm=marco                                              \
   --with-systemd=yes                                                       
make %{?_smp_mflags}

%install
%makeinstall
%{find_lang} %{name} %{?no_lang_C}
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/mate-session-properties.desktop
%suse_update_desktop_file %{buildroot}%{_datadir}/xsessions/mate.desktop
install -D -m0644 mate_defaults.conf %{buildroot}%{_sysconfdir}/mate_defaults.conf
if [ -d %{buildroot}%{_datadir}/MateConf ]; then
   rm -r %{buildroot}%{_datadir}/MateConf
fi

%post
%glib2_gsettings_schema_post
%icon_theme_cache_post

%postun
%glib2_gsettings_schema_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc ChangeLog README COPYING
%dir %{_datadir}/%{name}
%{_bindir}/mate-*
%{_datadir}/applications/mate-session-properties.desktop
%{_datadir}/icons/hicolor
%{_datadir}/%{name}/*.ui
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/xsessions/mate.desktop
%{_mandir}/man1/mate-*.1.gz

%files branding-upstream
%defattr(-,root,root)
%doc README.Gsettings-overrides
%config (noreplace) %{_sysconfdir}/mate_defaults.conf

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by