Name:           ukui-greeter
Version:        3.1.2
Release:        10
Summary:        Lightdm greeter for UKUI
License:        GPL-2.0-or-later
URL:            http://www.ukui.org
Source0:        ukui-greeter-%{version}.tar.gz
Patch01:        0001-fix-greeter-translation.patch
Patch02:	0002-fix-version-upgraded-the-default-background-is-blank.patch
Patch03:	0003-fix-build-compile-error.patch
Patch04:	0004-Fix-the-problem-that-the-login-interface-will-flash-back.patch
%if 0%{?kylin}
Patch05:        disable-Suspend-and-Sleep-of-ukui-greeter.patch
%endif
Patch06:        translation-error-about-Login.patch
BuildRequires: pkgconf qt5-qtbase-devel qt5-qtx11extras-devel qt5-qtsvg-devel lightdm-qt5-devel libX11-devel libXtst-devel libXrandr-devel qt5-qttools-devel imlib2-devel xorg-x11-drivers opencv glib2-devel
BuildRequires: gsettings-qt-devel
Requires: pkgconf
Requires: xorg-x11-drivers
Requires: lightdm
Requires: opencv
Requires: ethtool
Requires: xorg-x11-server-utils
Requires: xorg-x11-server
Requires: xorg-x11-xauth
Requires: xorg-x11-xinit
Requires: xorg-x11-proto-devel
Requires: xorg-x11-drv-libinput
Requires: xorg-x11-xkb-utils

Provides: lightdm-greeter

%description
A greeter for UKUI desktop environment written by Qt5.
 The greeter supports biometric authentication which is
 provided by biometric-authentication service.
%prep
%setup -q
%patch01 -p1
%patch02 -p1
if [ -e "/usr/include/glib-2.0/gio/gunixfdlist.h" ]; then
%patch03 -p1
fi
%patch04 -p1
%if 0%{?kylin}
%patch05 -p1
%endif
%patch06 -p1

%build
qmake-qt5
make -j4

%install
make INSTALL_ROOT=%{buildroot} install

mkdir -p %{buildroot}/usr/share/man/man8/
gzip  -c ukui-greeter/man/ukui-greeter.8 > %{buildroot}/usr/share/man/man8/ukui-greeter.8.gz

%clean

%files
%doc  debian/copyright debian/changelog
%{_sysconfdir}/lightdm/ukui-greeter.conf
%{_sysconfdir}/dbus-1/system.d/org.ukui.Greeter.conf
%{_datadir}/man/man8/ukui-greeter.8.gz
%{_sbindir}/ukui-greeter
%{_datadir}/lightdm/lightdm.conf.d/95-ukui-greeter.conf
%{_datadir}/ukui-greeter/
%{_datadir}/xgreeters/ukui-greeter.desktop
/usr/lib/ukui-greeter/greeter-nm-helper
/usr/lib/ukui-greeter/ukui-greeter-nm-start.sh

%changelog
* Thu Jun 15 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-10
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: add translation-error-about-Login.patch

* Wed Jun 14 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-9
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: disable Suspend and Sleep of ukui-greeter

* Thu May 25 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-8
- update glib2 error

* Tue Mar 14 2023 douyan <douyan@kylinos.cn> - 3.1.2-7
- remove unnecessary requires

* Fri Mar 10 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-6
- Fix the problem that the login interface will flash back

* Wed Feb 08 2023 tanyulong <tanyulong@kylinos.cn> - 3.1.2-5
- Enable debuginfo for fix strip

* Wed Feb 08 2023 tanyulong <tanyulong@kylinos.cn> - 3.1.2-4
- fix build compile error

* Mon Feb 06 2023 tanyulong <tanyulong@kylinos.cn> - 3.1.2-3
- fix version upgraded the default background is blank

* Fri Jan 6 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-2
- fix greeter translation

* Wed Nov 23 2022 tanyulong <tanyulong@kylinos.cn> - 3.1.2-1
- update upstream version 3.1.2

* Fri Jul 29 2022 tanyulong<tanyulong@kylinos.cn> - 3.0.1-14
- fix Dual screen hot plug problem

* Fri Jul 29 2022 tanyulong<tanyulong@kylinos.cn> - 3.0.1-13
- update translations text

* Thu Jul 28 2022 tanyulong<tanyulong@kylinos.cn> - 3.0.1-12
- solve the incomplete display of pam authentication message

* Fri Jul 15 2022 peijiankang<peijiankang@kylinos.cn> - 3.0.1-11
- Fix the display error of mima

* Fri May 20 2022 tanyulong<tanyulong@kylinos.cn> - 3.0.1-10
- Improve the project according to the requirements of compliance improvement

* Tue Mar 29 2022 huayadong <huayadong@kylinos.cn> - 3.0.1-9
- 当用户名显示较长时，完整用户名通过tooltip显示

* Fri Dec 10 2021 huayadong <huayadong@kylinos.cn> - 3.0.1-8
- add patch6:0001-add-pending-sleep-1126.patch

* Thu Dec 09 2021 huayadong <huayadong@kylinos.cn> - 3.0.1-7
- add patch5:ukui-greeter-the-full-user-name-is-displayed-through-tooltip.patch

* Fri Oct 29 2021 tanyulong <tanyulong@kylinos.cn> - 3.0.1-6
- Solve the problem that biometric devices cannot read

* Fri Oct 29 2021 tanyulong <tanyulong@kylinos.cn> - 3.0.1-5
- add set dpi

* Thu Oct 28 2021 tanyulong <tanyulong@kylinos.cn> - 3.0.1-4
- Avoid problem of writing Chinese garbled characters in qsettings

* Tue Dec 8 2020 lvhan <lvhan@kylinos.cn> - 3.0.1-3
- 0001-fix-icon-misplaced.patch

* Tue Dec 8 2020 douyan <douyan@kylinos.cn> - 3.0.1-2
- 0002-fix-ukui-greeter-desktop-option-issue.patch

* Mon Oct 26 2020 douyan <douyan@kylinos.cn> - 3.0.1-1
- update 3.0.0-1+1026

* Mon Jul 20 2020 douyan <douyan@kylinos.cn> - 1.2.5-1
- update 1.2.5

* Thu Jul 9 2020 douyan <douyan@kylinos.cn> - 1.2.3-1
- Init package for openEuler
