Name:           gnome-initial-setup
Version:        3.38.5
Release:        1
Summary:        A easy way to prepare a new system
License:        GPLv2+
URL:            https://wiki.gnome.org/Design/OS/InitialSetup
Source0:        https://download.gnome.org/sources/gnome-initial-setup/3.38/gnome-initial-setup-%{version}.tar.xz
Source1:        vendor.conf
Patch9000:      0001-gnome-initial-setup-remove-link-Macau-to-Macao.patch

BuildRequires:  krb5-devel desktop-file-utils libpwquality-devel
BuildRequires:  pkgconfig(libnm) >= 1.2 pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(libnma) >= 1.0 pkgconfig(cheese)
BuildRequires:  pkgconfig(accountsservice) pkgconfig(fontconfig)
BuildRequires:  pkgconfig(gnome-desktop-3.0) pkgconfig(gweather-3.0)
BuildRequires:  pkgconfig(cheese-gtk) >= 3.3.5 pkgconfig(goa-1.0)
BuildRequires:  pkgconfig(geocode-glib-1.0) pkgconfig(goa-backend-1.0)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.11.3 pkgconfig(glib-2.0) >= 2.63.1
BuildRequires:  pkgconfig(gio-2.0) >= 2.63.1 pkgconfig(gio-unix-2.0) >= 2.63.1
BuildRequires:  pkgconfig(gdm) pkgconfig(iso-codes)
BuildRequires:  pkgconfig(libgeoclue-2.0) >= 2.3.1 pkgconfig(packagekit-glib2)
BuildRequires:  pkgconfig(webkit2gtk-4.0) ibus-devel rest-devel polkit-devel
BuildRequires:  libsecret-devel gnome-common meson gcc

Requires:       gdm geoclue2-libs >= 2.3.1 glib2 >= 2.63.1 polkit-js-engine libgnomekbd
Requires(pre):  shadow-utils

Provides:       user(%name)

%description
After acquiring or installing a new system there are a few essential things to
set up before use. It would be nice if GNOME had a simple, easy, and safe way to
prepare a new system.

%prep
%autosetup -p1

%build
%meson -Dparental_controls=disabled -Dvendor-conf-file=%{_datadir}/gnome-initial-setup/vendor.conf
%meson_build

%install
%meson_install
%delete_la

desktop-file-validate %{buildroot}%{_sysconfdir}/xdg/autostart/gnome-initial-setup-copy-worker.desktop
desktop-file-validate %{buildroot}%{_datadir}/gdm/greeter/applications/gnome-initial-setup.desktop

install -d %{buildroot}%{_datadir}/gnome-initial-setup
cp %{SOURCE1} %{buildroot}%{_datadir}/gnome-initial-setup/

%find_lang gnome-initial-setup

%pre
useradd -rM -d /run/gnome-initial-setup/ -s /sbin/nologin %{name} &>/dev/null || :

%files -f gnome-initial-setup.lang
%doc README.md COPYING
%{_libexecdir}/gnome-initial-setup*
%{_libexecdir}/gnome-welcome-tour
%{_sysconfdir}/xdg/autostart/*.desktop
%{_datadir}/gdm/greeter/applications/*.desktop
%{_datadir}/gnome-session/sessions/gnome-initial-setup.session
%{_datadir}/gnome-shell/modes/initial-setup.json
%{_datadir}/polkit-1/rules.d/20-gnome-initial-setup.rules
%{_userunitdir}/*

%dir %{_datadir}/gnome-initial-setup
%{_datadir}/gnome-initial-setup/vendor.conf

%changelog
* Mon Jun 7 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.5-1
- Upgrade to 3.38.5
- Update Version, Release, Source0, BuildRequires, Requires, stage 'build', 'install', 'files'
- Use meson rebuild, delete setup-shell.desktop, which doesn't existed in this version
- Delete honor-firstboot-disabled.patch which existed in this version

* Tue Jan 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.30.0-3
- Type:bugfix
- ID:NA
- SUG:reboot
- DESC:remove link Macau to Macao

* Wed Dec 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.30.0-2
- Package init
