File gnome-settings-daemon.spec of Package gnome-settings-daemon.391

#
# spec file for package gnome-settings-daemon
#
# Copyright (c) 2015 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/
#


# We cannot enable systemd support right now, as it is exclusive and means we
# lose ConsoleKit support (bad for sysvinit)
%define with_systemd 1

# Allow to enable/disable ibus, as GNOME is rather strict on new versions.
%define with_ibus 1

# Smart-Card support is disabled in version 3.7.3
%define with_smartcard 1

# Wacom input support
%ifarch s390 s390x
%define with_wacom 0
%else
%define with_wacom 1
%endif

Name:           gnome-settings-daemon
Version:        3.10.2
Release:        0
Summary:        Settings daemon for the GNOME desktop
License:        GPL-2.0+
Group:          System/GUI/GNOME
Url:            http://www.gnome.org
Source:         http://download.gnome.org/sources/gnome-settings-daemon/3.10/%{name}-%{version}.tar.xz
# PATCH-NEEDS-REBASE gnome-settings-daemon-system-proxy-configuration.diff
Patch2:         gnome-settings-daemon-system-proxy-configuration.diff
# PATCH-FEATURE-UPSTREAM gnome-settings-daemon-bnc462640-mute-action.patch bnc462640 bgo572365 vuntz@novell.com -- Mute button should always mute sound instead of toggling mute status
Patch10:        gnome-settings-daemon-bnc462640-mute-action.patch
# PATCH-FIX-OPENSUSE gnome-settings-daemon-stop-reload-proxy-settings.patch bnc689592#c1, bnc#538353 glin@suse.com -- Stop g-s-d poping up the authentication dialog for reloading the proxy settings
Patch17:        gnome-settings-daemon-stop-reload-proxy-settings.patch
# PATCH-FEATURE-UPSTREAM  gnome-settings-daemon-notify-idle-resumed.patch bnc#439018 bnc#708182 bgo#575467 hpj@suse.com -- notify user about auto suspend when returning from sleep
Patch19:        gnome-settings-daemon-notify-idle-resumed.patch
# PATCH-FIX-UPSTREAM gnome-settings-daemon-export-Gtk_ShellShowsDesktop-setting.patch bgo#712302 zaitor@opensuse.org -- Stop showing desktopfolder in nautilus sidebar when using gnome-shell.
Patch20:        gnome-settings-daemon-export-Gtk_ShellShowsDesktop-setting.patch
# PATCH-FEATURE-UPSTREAM  gnome-settings-daemon-upower-backport.patch mgorse@suse.com -- Update for libupower-glib API changes.
Patch21:        gnome-settings-daemon-upower-backport.patch
# PATCH-FIX-OPENSUSE gnome-settings-daemon-upower-fix.patch bnc#861365 lpechacek@suse.cz -- Fixup gnome-settings-daemon-upower-backport.patch
Patch22:        gnome-settings-daemon-upower-fix.patch
# PATCH-FIX-OPENSUSE gnome-settings-daemon-bnc862603-remove-battery-recall-code.patch bnc#862603 lpechacek@suse.cz -- Fixup gnome-settings-daemon-upower-backport.patch
Patch23:        gnome-settings-daemon-bnc862603-remove-battery-recall-code.patch
# PATCH-FIX-SLE monitor off timeout is too short, extends it to 5 min see bnc#869685
Patch24:        sle-configure-timeout-blank.patch
# PATCH-FIX-SLE updates-dont-use-changed-signal-on-UpClient.patch bnc#873759 mgorse@suse.com -- Another fix for upower-glib 0.99.
Patch25:        updates-dont-use-changed-signal-on-UpClient.patch
# PATCH-FIX-SLE remove warnings in /var/log/messages on SLES bnc#873545 
Patch26:        gnome-settings-daemon-bnc873545-hide-warnings.patch
# PATCH-FIX-SLE gnome-settings-daemon-initial-keyboard.patch fcrozat@suse.com -- Stop adding english layout by default
Patch27:        gnome-settings-daemon-initial-keyboard.patch
# PATCH-FIX-UPSTREAM gnome-settings-daemon-bnc877552.patch sreeves@suse.com -- gdm respond to power button
Patch28:        gnome-settings-daemon-bnc877552.patch
# PATCH-FIX-UPSTREAM gnome-settings-daemon-bnc872820-gtk-decoration-layout.patch bnc872820 federico@suse.com -- Propagate org.gnome.desktop.wm.preferences button-layout to the Gtk/DecorationLayout XSetting
Patch29:        gnome-settings-daemon-bnc872820-gtk-decoration-layout.patch
# PATCH-FIX-SLE gnome-settings-daemon-icewm-cursor.patch bnc#905158 dliang@suse.com -- Donot hide the cursor in icewm
Patch30:        gnome-settings-daemon-icewm-cursor.patch
# PATCH-FIX-UPSTREAM gnome-settings-daemon-no-lockscreen-screenshot.patch bnc#900031 bgo#737456 CVE-2014-7300 cxiong@suse.com -- media-keys: Disallow screenshots when locked
Patch31:        gnome-settings-daemon-no-lockscreen-screenshot.patch
BuildRequires:  cups-devel
BuildRequires:  fdupes
BuildRequires:  gnome-common
BuildRequires:  gnome-patch-translation
BuildRequires:  intltool
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  xsltproc
# For directory ownership; it's fine to BuildRequire it since it's also a Requires
BuildRequires:  polkit
BuildRequires:  pkgconfig(colord) >= 1.0.2
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(gconf-2.0) >= 2.6.1
BuildRequires:  pkgconfig(geoclue-2.0)
BuildRequires:  pkgconfig(geocode-glib-1.0) >= 3.10.0
BuildRequires:  pkgconfig(glib-2.0) >= 2.37.7
BuildRequires:  pkgconfig(gnome-desktop-3.0) >= 3.9.0
BuildRequires:  pkgconfig(gsettings-desktop-schemas) >= 3.9.91
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.7.8
BuildRequires:  pkgconfig(gudev-1.0)
BuildRequires:  pkgconfig(gweather-3.0) >= 3.9.5
%if %{with_ibus}
BuildRequires:  pkgconfig(ibus-1.0) >= 1.4.99
%endif
BuildRequires:  pkgconfig(kbproto)
BuildRequires:  pkgconfig(lcms2)
BuildRequires:  pkgconfig(libcanberra-gtk3)
BuildRequires:  pkgconfig(libnotify) >= 0.7.3
BuildRequires:  pkgconfig(libpulse) >= 2.0
BuildRequires:  pkgconfig(libpulse-mainloop-glib) >= 2.0
BuildRequires:  pkgconfig(librsvg-2.0) >= 2.36.2
%if %{with_systemd}
BuildRequires:  pkgconfig(libsystemd-login)
%endif
%if %{with_wacom}
BuildRequires:  pkgconfig(libwacom) >= 0.7
BuildRequires:  pkgconfig(xorg-wacom)
%endif
BuildRequires:  pkgconfig(nss)
BuildRequires:  pkgconfig(packagekit-glib2) >= 0.8.1
BuildRequires:  pkgconfig(pango) >= 1.20.0
BuildRequires:  pkgconfig(polkit-gobject-1) >= 0.103
BuildRequires:  pkgconfig(upower-glib) >= 0.99.0
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xfixes)
BuildRequires:  pkgconfig(xi)
BuildRequires:  pkgconfig(xkbfile)
BuildRequires:  pkgconfig(xtst)
Requires:       gsettings-desktop-schemas
# g-s-d uses the pkexec binary
Requires:       polkit
Recommends:     %{name}-lang
# For housekeeping plugin, that uses the nautilus dbus service
Recommends:     nautilus
Obsoletes:      resapplet
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

%description
gnome-settings-daemon provides a daemon run by all GNOME sessions to
provide live access to configuration settings and the changes done to
them as well as basic services like a clipboard manager, controlling
the startup of the screensaver, etc.

This module was previously part of GNOME Control Center, but has been
splitted from it for a more general use.

%package devel
Summary:        Development package for the GNOME settings daemon
Group:          System/GUI/GNOME
Requires:       %{name} = %{version}

%description devel
gnome-settings-daemon provides a daemon run by all GNOME sessions to
provide live access to configuration settings and the changes done to
them as well as basic services like a clipboard manager, controlling
the startup of the screensaver, etc.

This package includes header files used for client applications to
contact the settings daemon via its DBus interface.

%lang_package
%prep
%setup -q
translation-update-upstream
gnome-patch-translation-prepare
#%%patch2 -p0
%patch10 -p0
%patch17 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
gnome-patch-translation-update

%build
autoreconf -f -i
%configure\
%if %{with_systemd}
        --enable-systemd \
%endif
        --enable-gconf-bridge \
        --disable-static \
        --with-pnpids=%{_datadir}/libgnome-desktop-3.0/pnp.ids \
        --libexecdir=%{_libexecdir}/gnome-settings-daemon-3.0 \
%if %{with_ibus}
        --enable-ibus
%else
        --disable-ibus
%endif

make %{?jobs:-j%jobs} V=1

%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%suse_update_desktop_file gnome-settings-daemon
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%post
%glib2_gsettings_schema_post
%icon_theme_cache_post

%postun
%glib2_gsettings_schema_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS
%if %{with_ibus}
%{_datadir}/dbus-1/services/org.freedesktop.IBus.service
%endif
%{_datadir}/gnome-settings-daemon/
%{_datadir}/gnome-settings-daemon-3.0/
%dir %{_libexecdir}/gnome-settings-daemon-3.0/
%{_libexecdir}/gnome-settings-daemon-3.0/gnome-settings-daemon
%{_libexecdir}/gnome-settings-daemon-3.0/gnome-settings-daemon-localeexec
%{_libexecdir}/gnome-settings-daemon-3.0/gsd-backlight-helper
%{_libexecdir}/gnome-settings-daemon-3.0/gsd-locate-pointer
%{_libexecdir}/gnome-settings-daemon-3.0/gsd-printer
%{_libexecdir}/gnome-settings-daemon-3.0/gsd-test-*
# From patch2
#%{_libexecdir}/novell-sysconfig-proxy-helper
%dir %{_libdir}/gnome-settings-daemon-3.0/
%{_libdir}/gnome-settings-daemon-3.0/libgsd.so
%{_libdir}/gnome-settings-daemon-3.0/*.gnome-settings-plugin
# Explicitly list all the plugins so we know we don't lose any
%{_libdir}/gnome-settings-daemon-3.0/liba11y-keyboard.so
%{_libdir}/gnome-settings-daemon-3.0/liba11y-settings.so
%{_libdir}/gnome-settings-daemon-3.0/libclipboard.so
%{_libdir}/gnome-settings-daemon-3.0/libcolor.so
%{_libdir}/gnome-settings-daemon-3.0/libcursor.so
%{_libdir}/gnome-settings-daemon-3.0/libdatetime.so
%{_libdir}/gnome-settings-daemon-3.0/libhousekeeping.so
%{_libdir}/gnome-settings-daemon-3.0/libkeyboard.so
%{_libdir}/gnome-settings-daemon-3.0/libmedia-keys.so
%{_libdir}/gnome-settings-daemon-3.0/libmouse.so
%{_libdir}/gnome-settings-daemon-3.0/liborientation.so
%{_libdir}/gnome-settings-daemon-3.0/libpower.so
%{_libdir}/gnome-settings-daemon-3.0/libprint-notifications.so
%{_libdir}/gnome-settings-daemon-3.0/libremote-display.so
%{_libdir}/gnome-settings-daemon-3.0/librfkill.so
%{_libdir}/gnome-settings-daemon-3.0/libscreensaver-proxy.so
%if %{with_smartcard}
%{_libdir}/gnome-settings-daemon-3.0/libsmartcard.so
%endif
%{_libdir}/gnome-settings-daemon-3.0/libsound.so
%{_libdir}/gnome-settings-daemon-3.0/libupdates.so
%{_libdir}/gnome-settings-daemon-3.0/libxrandr.so
%{_libdir}/gnome-settings-daemon-3.0/libxsettings.so
%{_sysconfdir}/xdg/autostart/gnome-settings-daemon.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.enums.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.peripherals.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.peripherals.wacom.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.color.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.datetime.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.housekeeping.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.keyboard.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.media-keys.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.orientation.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.print-notifications.gschema.xml
# From patch2
#%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.proxy.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.updates.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.xrandr.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.xsettings.gschema.xml
%{_datadir}/icons/hicolor/*/apps/gsd-xrandr.*
%{_datadir}/polkit-1/actions/org.gnome.settings-daemon.plugins.power.policy
%{_mandir}/man1/gnome-settings-daemon.1%{?ext_man}
# Own the directory since we can't depend on gconf providing them
%dir %{_datadir}/GConf
%dir %{_datadir}/GConf/gsettings
%{_datadir}/GConf/gsettings/gnome-settings-daemon.convert
%if %{with_wacom}
%{_datadir}/polkit-1/actions/org.gnome.settings-daemon.plugins.wacom.policy
%{_libexecdir}/gnome-settings-daemon-3.0/gsd-list-wacom
%{_libexecdir}/gnome-settings-daemon-3.0/gsd-wacom-led-helper
%{_libexecdir}/gnome-settings-daemon-3.0/gsd-wacom-oled-helper
%{_libdir}/gnome-settings-daemon-3.0/libgsdwacom.so
%endif

%files lang -f %{name}.lang

%files devel
%defattr (-, root, root)
%{_includedir}/gnome-settings-daemon-3.0/
%{_libdir}/pkgconfig/gnome-settings-daemon.pc

%changelog
openSUSE Build Service is sponsored by