Name: kiran-cpanel-display
Version: 2.2.0
Release: 3.kb3
Summary: kiran display tools

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

Patch0001: 0000-fix-revealed-overlapping-temporarily-solve-the-probl-75bfd27c.patch
Patch0002: 0001-fix-control-center-fix-kiran-session-display-managem-c857dfc8.patch

BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libX11-devel
BuildRequires: qt5-qtx11extras-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtsvg-devel
BuildRequires: qt5-linguist
BuildRequires: kiran-widgets-qt5-devel
BuildRequires: kiran-cc-daemon-devel
BuildRequires: kiran-log-qt5-devel
BuildRequires: kiran-control-panel-devel

Requires: libX11
Requires: qt5-qtx11extras
Requires: qt5-qtbase
Requires: qt5-qtsvg
Requires: kiran-widgets-qt5
Requires: kiran-session-daemon
Requires: kiran-log-qt5
Requires: kiran-cpanel-launcher

Obsoletes:    kiran-display-tools

%description
%{summary}.

%prep
%setup -q
%patch0001 -p1
%patch0002 -p1

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

%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
%{_datadir}/kiran-control-panel/plugins/libs/libkiran-cpanel-display.so*
%{_datadir}/kiran-control-panel/plugins/desktop/*
%{_datadir}/icons/hicolor/*
%{_datadir}/kiran-cpanel-display/translations/*.qm
%{_datadir}/applications/*

%clean
rm -rf %{buildroot}

%changelog
* Sat Jan 15 2022 longcheng <longcheng@kylinos.com.cn> - 2.2.0-3.kb3
- KYOS-B: fix the patch was not inserted

* Thu Dec 30 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.2.0-3.kb2
- KYOS-B: temporarily solve the problem of display overlap and screen gap(#46434)
- KYOS-B: fix kiran session display 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-1.kb1
- rebuild for KY3.4-4-KiranUI-2.2

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

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

* Fri Nov 05 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.0-2.kb1
- KYBD: changed required name and license

* Tue Jul 20 2021 luixinhao <liuxinhao@kylinos.com.cn> - 2.1.0-1.kb1
- KYOS-F: install desktop link

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

* Wed Jun 09 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 1.1.0-1.kb1
- KYOS-F: build for KiranControlPanel plugin

* Tue Feb 02 2021 yangxiaoqing <yangxiaoqing@kylinsec.com.cn> - 1.0+alpha2
- KYOS-F: Complete cmake hierarchical management(#34612);Add support for up and down flip and horizontal flip (#34217)

* Thu Nov 26 2020 yangxiaoqing <yangxiaoqing@kylinsec.com.cn> - 1.0+alpha1
- First release




