Name:           gnome-settings-daemon
Version:        3.38.2
Release:        2
Summary:        Settings of GNOME Sessions and related applications
License:        GPLv2+
URL:            https://download.gnome.org/sources/%{name}
Source0:        https://download.gnome.org/sources/%{name}/3.38/%{name}-%{version}.tar.xz
Source1:        org.gnome.settings-daemon.plugins.power.gschema.override

BuildRequires:  cups-devel gcc gettext meson >= 0.44.0 perl-interpreter pkgconfig(alsa)
BuildRequires:  pkgconfig(colord) >= 1.3.5 pkgconfig(fontconfig) pkgconfig(geoclue-2.0) >= 2.3.1
BuildRequires:  pkgconfig(geocode-glib-1.0) >= 3.10.0 pkgconfig(glib-2.0) >= 2.53.0
BuildRequires:  pkgconfig(gnome-desktop-3.0) >= 3.34.2 pkgconfig(gsettings-desktop-schemas) >= 3.35.91
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.15.3 pkgconfig(gudev-1.0) pkgconfig(gweather-3.0) >= 3.9.5
BuildRequires:  pkgconfig(lcms2) >= 2.2 pkgconfig(libcanberra-gtk3) pkgconfig(libgeoclue-2.0)
BuildRequires:  pkgconfig(libnm) pkgconfig(libnotify) pkgconfig(libpulse) pkgconfig(libpulse-mainloop-glib)
BuildRequires:  pkgconfig(librsvg-2.0) pkgconfig(nss) pkgconfig(polkit-gobject-1) pkgconfig(upower-glib)
BuildRequires:  pkgconfig(x11) pkgconfig(xi) pkgconfig(xtst) pkgconfig(wayland-client)
BuildRequires:  pkgconfig(libwacom) >= 0.7 pkgconfig(xorg-wacom) pkgconfig(gcr-base-3) pkgconfig(mm-glib) chrpath

Requires:       colord geoclue2 >= 2.3.1 geocode-glib >= 3.10.0 glib2 >= 2.53.0
Requires:       gnome-desktop3 >= 3.27.90 gsettings-desktop-schemas >= 3.23.3
Requires:       gtk3 >= 3.15.3 iio-sensor-proxy libgweather >= 3.9.5 

Obsoletes:      %{name}-updates < 3.13.1 drwright < 3.5.0-3 gnome-settings-daemon-devel < 3.23.1

Conflicts:      gdm < 1:3.27.90 gnome-session < 3.27.90 gnome-shell < 3.25.4

%description
The GNOME Settings Daemon is responsible for setting various parameters of a
GNOME Session and the applications that run under it.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name} = %{version}-%{release}

%description    devel
gnome-settings-daemon-devel provides static libraries,head files,test cases
and other related development files of gnome-settings-daemon.

%prep
%autosetup -p1

%build
%meson
%meson_build

%install
%meson_install

cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas

%find_lang %{name} --with-gnome

install -d $RPM_BUILD_ROOT%{_libdir}/gnome-settings-daemon-3.0/gtk-modules

chrpath -d %{buildroot}%{_libexecdir}/*
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/gnome-settings-daemon-3.0" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files -f %{name}.lang
%doc AUTHORS NEWS
%license COPYING

%{_libexecdir}/gsd-*
%{_sysconfdir}/xdg/autostart/*
%{_sysconfdir}/xdg/Xwayland-session.d/00-xrdb
%{_userunitdir}/*
%{_datadir}/glib-2.0/schemas/*
%{_datadir}/polkit-1/actions/*
%{_libdir}/gnome-settings-daemon-3.0/libgsd.so
%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf

/usr/lib/udev/rules.d/*.rules
%{_datadir}/gnome-settings-daemon/
%{_datadir}/GConf/gsettings/gnome-settings-daemon.convert

%files devel
%{_includedir}/gnome-settings-daemon-3.0
%{_libdir}/pkgconfig/gnome-settings-daemon.pc

%changelog
* Thu Sep 09 2021 lingsheng <lingsheng@huawei.com> - 3.38.2-2
- Delete rpath setting

* Mon May 24 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.2-1
- Upgrade to 3.38.2
- Update Version, Release, stage 'files'

* Fri Nov 29 2019 zhouyihang <zhouyihang1@huawei.com> - 3.30.1.2-2
- Package init
