Name:		kiran-cpanel-account
Version:	2.2.0
Release:  	5
Summary:	Kiran Account Manager
Summary(zh_CN): 用户管理工具

License: 	Mulan PSL v2
Source0:	%{name}-%{version}.tar.gz

Patch0001: 0000-fix-control-center-fix-kiran-session-account-managem-97343173.patch
Patch0002: 0002-fix-create-user-the-user-was-created-successfully-bu-60fd3816.patch
Patch0003: 0003-fix-build-fix-incomplete-type-class-QPainterPath-bui-8c9d4052.patch
Patch0004: 0004-fix-create-user-Remove-the-prefix-Create-User-Failed-dfba753b.patch

BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libX11-devel
BuildRequires:  pam-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  qt5-linguist
BuildRequires:  qt5-qtbase-devel
BuildRequires:  qt5-qtx11extras-devel
BuildRequires:  qt5-qtsvg-devel
BuildRequires:  kiran-widgets-qt5-devel
BuildRequires:  zeromq-devel
BuildRequires:  kiran-cc-daemon-devel >= 2.0.7
BuildRequires:  kiran-biometrics-devel
BuildRequires:  kiran-log-qt5-devel
BuildRequires:  kiran-control-panel-devel
BuildRequires:  kiran-qdbusxml2cpp

Requires:  pam
Requires:  libX11
Requires:  libgcrypt
Requires:  kiran-widgets-qt5
Requires:  qt5-qtbase
Requires:  qt5-qtx11extras
Requires:  zeromq
Requires:  kiran-system-daemon
Requires:  kiran-biometrics
Requires:  kiran-log-qt5
Requires:  kiran-cpanel-launcher
Requires:  gtk-update-icon-cache

Provides: kiran-avatar-editor
Obsoletes: kiran-account-manager

%description
Account Manager

%prep
%autosetup -p1

%build
%{__mkdir} -p %{buildroot}
%cmake
make

%install
%make_install

%post
gtk-update-icon-cache -f /usr/share/icons/hicolor/

%posttrans
%define link_source %{_datadir}/kiran-control-panel/plugins/desktop/%{name}.desktop
%define link_target %{_datadir}/applications/%{name}.desktop
if [ ! -e %{link_target} ] ; then 
	ln -sf %{link_source} %{link_target}
	echo "link %{link_source} -> %{link_target}"
fi

%files
%doc
%{_datadir}/kiran-control-panel/plugins/libs/libkiran-cpanel-account.so*
%{_datadir}/kiran-control-panel/plugins/desktop/*
%{_datadir}/icons/hicolor/*
%{_datadir}/applications/*.desktop

%{_datadir}/%{name}/account-icons/*
%{_datadir}/%{name}/translations/*
%{_sysconfdir}/%{name}/*

%{_libexecdir}/kiran-avatar-editor

%clean
rm -rf %{buildroot}

%changelog
* Tue Mar 01 2022 longcheng <longcheng@kylinos.com.cn> - 2.2.0-5
- KYOS-B: Add Requires gtk-update-icon-cache

* Thu Feb 24 2022 chendingjian <chendingjian@kylinos.com.cn> - 2.2.0-4
- rebuild for KY3.4-MATE-modules-dev

* Tue Feb 22 2022 luoqing <luoqing@kylinos.com.cn> - 2.2.0-3.kb5
- KYOS-F: remove the prefix "Create User Failed"  

* Wed Jan 26 2022 longcheng <longcheng@kylinos.com.cn> - 2.2.0-3.kb4
- KYOS-B: fix compilation errors on OpenEuler 

* Wed Jan 19 2022 liuxinhao <liuxinhao@kylinos.com.cn> - 2.2.0-3.kb3
- KYOS-B: the user was created successfully, but the property setting failed. The user will not be deleted(#47439)

* Thu Dec 30 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.2.0-3.kb2
- fix kiran session account management is not displayed in the control panel

* Wed Dec 29 2021 kpkg <kpkg@kylinos.com.cn> - 2.2.0-3.kb1
- rebuild for KY3.4-MATE-modules-dev

* Wed Dec 29 2021 caoyuanji <caoyuanji@kylinos.com.cn> - 2.2.0-3
- Upgrade version number for easy upgrade

* Tue Dec 28 2021 caoyuanji <caoyuanji@kylinos.com.cn> - 2.2.0-2.kb1
- rebuild for KY3.4-4-KiranUI-2.2

* Tue Dec 21 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.2.0-2
- KYOS-F: add do crack passwd check build option

* Thu Dec 02 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.2.0-1
- KYBD: rebuild for 2.2,changed required name to kiran-widgets-qt5

* Thu Dec 02 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.1-2.kb2
- KYBD: changed required name to kiranwidgets-qt5

* Fri Nov 05 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.1-2.kb1
- KYBD: changed required name and license
- KYOS-B: passwd edit filter paster event(#45721)

* Mon Sep 06 2021 liuxinaho <liuxinhao@kylinos.com.cn> - 2.1.1-1.kb1
- KYOS-B: fix moc error

* Thu Aug 26 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.1.kb1
- KYOS-F: using kiran-qdbusxml2cpp generate code
- KYOS-F: remove biometrics build options

* Mon Aug 09 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.0-8.kb1
- KYOS-F: add password expiration policy(#42483)

* Thu Jul 29 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.0-7.kb1
- KYOS-F: can't delete current user(#41951)

* Thu Jul 22 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.0-6.kb1
- KYOS-B: change LoginName to UserName(#40542)

* Wed Jul 21 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.0-5.kb1 
- KYOS-B: install desktop link (#38890)

* Wed Jun 30 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.0-4.kb1
- KYOS-B: don't exit if translation file not found

* Mon Jun 28 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.0-3.kb1
- KYOS-B: unified user name for interface description (#40542)

* Wed Jun 23 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.0-2.kb1
- KYOS-B: modify user prompt infomation 

* Wed Jun 16 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.0-1.kb1
- KYOS-B: solve the related problems of authentication management page(#40172)

* Tue Jun 08 2021 liuxinhao <liuxinhao@Kylinos.com.cn> - 1.1.2-1.kb1
- KYOS-F: using kiran-log-qt5
- KYOS-F: build for KiranControlPanel plugin

* Tue May 11 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 1.1.1-2.kb1
- KYOS-B: filtering existing users in the processing of account service new users signal
- KYOS-B: solve the problem that the fingerprint entry window is not cleared after closing
- KYOS-B: fix avatar of root user is not displayed correctly

* Tue May 11 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 1.1.1-1.kb1
- KYOS-F: content of account management is displayed by scrolling area 
- KYOS-F: add show-root option
- KYOS-B: fix no user avatar
- KYOS-B: temporary dir was not deleted
- KYOS-B: fix avatar editor not load translation
- KYOS-B: fix biometric entry window is not deleted
- KYOS-B: fix analysis of Chinese JSON data garbled

* Thu Apr 29 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 1.1.0-1.kb1
- KYOS-F: using KiranStyle 
- KYOS-F: fit Qt5.9.7
- KYOS-F: using zlog for log output

* Tue Apr 06 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 1.0.2-1.kb2
- KYBD: rebuild

* Sat Mar 27 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 1.0.2-1.kb1
- KYOS-F: add face fingerprint authentication function (#35697)

* Thu Nov 26 2020 liuxinhao <liuxinhao@kylinos.com.cn> - 1.0.1+alpha3-1.kb2
- KYBD: rebuild for kiranwidgets-qt5-2

* Mon Nov 16 2020 liuxinhao <liuxinhao@kylinos.com.cn> - 1.0.1+alpha3-kb1
- KYOS-F: update buildin avatar
- KYOS-F: add translations
- KYOS-F: Account name verification

* Tue Nov 10 2020 liuxinhao <liuxinhao@kylinos.com.cn> - 1.0.1+alpha2-kb1
- KYOS-F: install buildin avatar

* Mon Nov 09 2020 liuxinhao <liuxinhao@kylinos.com.cn> - 1.0.1+alpha1-kb1
- Initial build
