%define _unpackaged_files_terminate_build 1
%global _vpath_srcdir .
%global _vpath_builddir build
%global __global_cflags %{optflags}
%global __global_ldflags ""

Summary:	The daemon sharing settings from GNOME to GTK+/KDE applications
Summary(ja):	GNOME から GTK+/KDE のアプリケーションで設定を共有するためのデーモン

Name:		gnome-settings-daemon
Version:	3.30.1.2
Release:	1%{?_dist_release}

Group:		System Environment/Daemons
License:	GPLv2+
URL:		http://ftp.gnome.org/pub/gnome/sources/%{name}
Source0:	http://ftp.gnome.org/pub/gnome/sources/%{name}/3.30/%{name}-%{version}.tar.xz
Source1:	org.gnome.settings-daemon.plugins.power.gschema.override

# patch for Vine

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

BuildRequires:	meson
BuildRequires:	dbus-glib-devel
BuildRequires:	gtk3-devel
BuildRequires:	gnome-desktop3-devel >= 3.30.0
BuildRequires:	libgnome-devel
BuildRequires:	libgweather-devel >= 3.9.5
BuildRequires:	xorg-x11-proto-devel
BuildRequires:	libXrandr-devel
BuildRequires:	fontconfig-devel
BuildRequires:	gstreamer-devel
BuildRequires:	gstreamer-plugins-base-devel
BuildRequires:  pulseaudio-libs-devel
BuildRequires:	libgnomekbd-devel >= 2.32.0
BuildRequires:	libxklavier-devel >= 5.0
BuildRequires:	libxkbfile-devel
BuildRequires:	xkeyboard-config
BuildRequires:  libnotify-devel >= 0.4.3
BuildRequires:  libnm-gtk-devel
BuildRequires:  NetworkManager-libnm-devel
BuildRequires:	gettext
BuildRequires:	perl-XML-Parser
BuildRequires:	libSM-devel
BuildRequires:	eudev-libudev-devel
BuildRequires:	libgudev1-devel
BuildRequires:	nss-devel
BuildRequires:	polkit-devel
BuildRequires:	cups-devel
BuildRequires:	upower-devel >= 0.99.0
BuildRequires:	libcanberra-gtk3-devel
BuildRequires:	colord-devel
BuildRequires:	lcms2-devel
BuildRequires:	libwacom-devel
BuildRequires:	xorg-x11-drv-wacom-devel
BuildRequires:	librsvg2-devel
BuildRequires:	libXtst-devel
BuildRequires:	geocode-glib-devel
BuildRequires:	geoclue2-devel >= 2.3.1
BuildRequires:	alsa-lib-devel

Vendor: Project Vine
Distribution: Vine Linux

%description
A daemon to share settings from GNOME to other applications. It also
handles global keybindings, as well as a number of desktop-wide settings.

%package	devel
Summary:	Development files for %{name}
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	pkgconfig
Requires:	dbus-glib-devel

%description	devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%prep
%setup -q

%build
%meson \
    -Dwayland=false
%meson_build

%install
rm -rf %{buildroot}
%meson_install

cp %{SOURCE1} %{buildroot}%{_datadir}/glib-2.0/schemas

find %{buildroot} -name '*.la' -exec rm -f {} ';'

cp %{SOURCE1} %{buildroot}%{_datadir}/glib-2.0/schemas

%find_lang %{name} --with-gnome

mkdir %{buildroot}%{_libdir}/gnome-settings-daemon-3.0/gtk-modules

%clean
rm -rf %{buildroot}

%post
touch %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
fi
  
%postun
touch %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
fi
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
  
%files -f %{name}.lang
%defattr(-,root,root,-)
%license COPYING
%doc AUTHORS NEWS
%{_sysconfdir}/xdg/autostart/*
%{_libdir}/gnome-settings-daemon-3.0
%{_libexecdir}/*
%{_datadir}/GConf/gsettings/gnome-settings-daemon.convert
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/glib-2.0/schemas/*.override
%{_datadir}/gnome-settings-daemon/
%{_datadir}/polkit-1/actions/org.gnome.settings-daemon.plugins.power.policy
%{_datadir}/polkit-1/actions/org.gnome.settings-daemon.plugins.wacom.policy
/lib/udev/rules.d/61-gnome-settings-daemon-rfkill.rules

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

%changelog
* Fri Dec 28 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.30.1.2-1
- new upstream release.

* Sun Jul 17 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.20.1-1
- new upstream release
- add BuildRequires: NetworkManager-libnm-devel

* Fri Nov 13 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.2-1
- new upstream release

* Sun Nov 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.1-1
- new upstream release

* Sun Jul 26 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.3-1
- new upstream release

* Sat May 16 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.2-1
- new upstream release

* Sun Apr 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.1-1
- new upstream release

* Sun Mar 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.0-1
- new upstream release

* Wed Nov 19 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.2-1
- new upstream release

* Sun Oct 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.1-1
- new upstream release
- remove Patch1000 (gnome-settings-daemon-3.6.0-disable-packagekit.patch)
- add BuildRequires: libnm-gtk-devel
- remove BuildRequires: ibus-devel

* Sun Sep 21 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.2-2
- rebuild with upower-0.99.1

* Sat May 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.2-1
- new upstream release

* Sun Apr 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.1-1
- new upstream release

* Sun Mar 30 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.0.1-1
- new upstream release
- add BuildRequires: libxkbfile-devel, xkeyboard-config
- add Patch1001 (gnome-settings-daemon-3.12.0.1-rfkill-plugin-udev.patch)

* Sat Nov 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.2-1
- new upstream release

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-1
- new upstream release
- add BuildRequires: libgweather-devel, geocode-glib-devel, geoclue2-devel

* Sun Aug 11 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.4-1
- new upstream release

* Sun Jun 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.3-1
- new upstream release
- remove Patch1001 (gnome-settings-daemon-3.6.3-input-source-switch-zenkaku-hankaku.patch)

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.2-1
- new upstream release

* Wed Apr 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.1-1
- new upstream release
- add BuildRequires: librsvg2-devel

* Fri Jan 11 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.4-1
- new upstream release

* Wed Nov 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.3-1
- new upstream release
- update Patch1 (gnome-settings-daemon-3.6.3-input-source-switch-zenkaku-hankaku.patch)

* Thu Nov 08 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-1
- new upstream release

* Fri Oct 26 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-2
- add Patch1 (gnome-settings-daemon-3.6.1-input-source-switch-zenkaku-hankaku.patch)

* Fri Oct 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Sun Sep 30 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release
- add BuildRequires: ibus-devel
- add Patch0 (gnome-settings-daemon-3.6.0-disable-packagekit.patch)

* Sun May 20 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
- new upstream release

* Sun Apr 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release
- add BuildRequires: libwacom-devel, xorg-x11-drv-wacom-devel, libXtst-devel

* Sun Nov 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.2-1
- new upstream release

* Sat Oct 22 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- new upstream release

* Thu Sep 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.92-1
- new upstream release

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.90-1
- new upstream release

* Sun Aug 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.5-1
- new upstream release

* Tue Aug 16 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.4-1
- new upstream release
- add BuildRequires: libgudev1-devel, nss-devel, polkit-devel, cups-devel, upower-devel
                     libcanberra-gtk3-devel, colord-devel, lcms2-devel
- change BuildRequires: gtk3-devel instead of gtk2-devel
- change BuildRequires: gnome-desktop3-devel instead of gnome-desktop-devel
- drop all Patches
- fix configure option

* Sat Nov 20 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.1-1
- new upstream release

* Tue Oct 05 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.0-1
- new upstream release

* Sat Sep 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.2-2
- rebuild with rpm-4.8.1 for pkg-config file

* Sat Jun 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.2-1
- new upstream release

* Thu Apr 29 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.1-1
- new upstream release

* Sun Apr 04 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.0-1
- new upstream release
- add BuildRequires: libSM-devel
- drop Patch0, Patch1

* Sun Mar 14 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.28.2-1
- new upstream release
- drop Patch2, Patch4

* Sat Oct 31 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.28.1-1
- new upstream release
- updated Patch100

* Sat Jun 06 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.1-2
- import patches from fedora
  - Patch10: listen for DeviceAdded
  - Patch11,12: add support touchpads
  - Patch13: Make custom keybindings work better
  - Patch14: Don't rely on _BACKUP property for xkb initialization

* Wed Apr 22 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.26.1-1
- new upstream release

* Sun Mar 29 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.0-3
- update Patch10
  - change hinting type to "none" instead of "medium"

* Wed Mar 25 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.0-2
- add Patch10 to set default dpi

* Sat Mar 21 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.0-1
- new upstream release

* Mon Jan 19 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.24.1-1
- new upstream release

* Wed Sep 24 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.24.0-1
- new upstream release

* Mon Sep 01 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.22.2.1-2
- build with pulseaudio
- add patch6 to ignore the legacy ESD GConf preference if compiled
  to use Pulseaudio

* Sat May 31 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.22.2.1-1
- new upstream release

* Wed Apr  9 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.22.1-1vl5
- new upstream release

* Mon Mar 31 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.22.0-1vl5
- Initial build for Vine Linux

* Wed Mar 26 2008 - Bastien Nocera <bnocera@redhat.com> - 2.22.1-0.2008.03.26.3
- Add patch for the mouse plugin not to eat multimedia key events (#438942)

* Wed Mar 26 2008 Jon McCann <jmccann@redhat.com> - 2.22.1-0.2008.03.26.2
- Rebuild

* Wed Mar 26 2008 Jon McCann <jmccann@redhat.com> - 2.22.1-0.2008.03.26.1
- Update to snapshot
- Enable profiling

* Wed Mar 26 2008 - Bastien Nocera <bnocera@redhat.com> - 2.22.0-3
- apps_gnome_settings_daemon_default_editor.schemas is obsolete (#438937)

* Thu Mar 20 2008 Matthias Clasen <mclasen@redhat.com> 2.22.0-2
- Fix interaction between "Locate Pointer" and volume keys

* Mon Mar 10 2008 Matthias Clasen <mclasen@redhat.com> 2.22.0-1
- Update to 2.22.0

* Sun Mar  9 2008 Ray Strode <rstrode@redhat.com> - 2.21.92-3
- Don't set keyboard model on startup from gconf if evdev is being used.
  Evdev needs to use its own keyboard model to work right.

* Sun Mar  2 2008 Soren Sandmann <sandmann@redhat.com> - 2.21.92-2
- Update randr patch to handle video key

* Fri Feb 29 2008 Jon McCann <jmccann@redhat.com> - 2.21.92-1
- Update to 2.21.92

* Tue Feb 12 2008 Soren Sandmann <sandmann@redhat.com> - 2.21.91-3
- Add patch to make the xrandr plugin listen for client messages from
  the control panel and reread the configuration file.

* Mon Feb 11 2008 Matthias Clasen <mclasen@redhat.com> - 2.21.91-2
- Remove obsolete control-center translations

* Mon Feb 11 2008 - Bastien Nocera <bnocera@redhat.com> - 2.21.91-1
- Update to 2.21.91
- Remove obsolete patches

* Thu Feb  7 2008 Matthias Clasen <mclasen@redhat.com> - 2.21.90.1-3
- Load xkb settings initially

* Thu Jan 31 2008 - Bastien Nocera <bnocera@redhat.com> - 2.21.90.1-2
- Fix the path for g-s-d, from upstream patch

* Tue Jan 29 2008 - Bastien Nocera <bnocera@redhat.com> - 2.21.90.1-1
- Update to 2.21.90.1

* Tue Jan 29 2008 - Bastien Nocera <bnocera@redhat.com> - 2.21.90-1
- Update to 2.21.90

* Tue Jan 15 2008  Matthias Clasen <mclasen@redhat.com> - 2.21.5.2-2
- Incorporate review feedback (#428833)

* Tue Jan 15 2008  Matthias Clasen <mclasen@redhat.com> - 2.21.5.2-1
- Update to 2.21.5.2

* Tue Jan 15 2008  Matthias Clasen <mclasen@redhat.com> - 2.21.5.1-1
- Update to 2.21.5.1
- Fix up BuildRequires

* Thu Dec 06 2007 - Bastien Nocera <bnocera@redhat.com> - 2.21.5-1
- First package

