Name:           gnome-settings-daemon
Version:        3.30.1.2
Release:        4
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.30/%{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.0.2 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.27.90 pkgconfig(gsettings-desktop-schemas) >= 3.23.3
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)

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}/gsd-*
mkdir -p %{buildroot}/etc/ld.so.conf.d
echo "%{_libdir}/gnome-settings-daemon-3.0" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf

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

%{_libexecdir}/gsd-[^t]*
%{_sysconfdir}/xdg/autostart/*
%{_datadir}/glib-2.0/schemas/*
%{_datadir}/polkit-1/actions/*
%{_libdir}/gnome-settings-daemon-3.0/libgsd.so
%config(noreplace) /etc/ld.so.conf.d/*

/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
%{_libexecdir}/gsd-test-input-helper

%changelog
* Fri Dec 01 2023 beta <beta@yfqm.date> - 3.30.1.2-4
- Fix ldconfig search path

* Thu Nov 09 2023 zhangxianting <zhangxianting@uniontech.com> - 3.30.1.2-3
- Remove rpath

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