%define debug_package %{nil}

Name:           ukui-panel
Version:        3.1.0
Release:        6
Summary:        ukui desktop panel
License:        LGPL-2.0-or-later  and GPL-2.0-or-later and BSD
URL:            http://www.ukui.org
Source0:        %{name}-%{version}.tar.gz
Patch01:        0001-fix-translation-problem-of-ukui-panel.patch
Patch02:        0002-fix-translation-of-calendar.patch
Patch03:        0003-fix-nightnode-button-nodisplay.patch

BuildRequires: cmake
BuildRequires: alsa-lib-devel
BuildRequires: dbusmenu-qt5-devel
BuildRequires: glib2-devel >= 2.36
BuildRequires: libicu-devel
BuildRequires: kf5-solid-devel
BuildRequires: kf5-kwindowsystem-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: qt5-qtsvg-devel
BuildRequires: qt5-qtx11extras-devel
#BuildRequires: lm_sensors-devel
#BuildRequires: libstatgrab-devel
BuildRequires: libsysstat-devel >= 0.4.2
BuildRequires: libX11-devel
#BuildRequires: libxcb-damage0-dev
BuildRequires: xcb-util-devel
BuildRequires: libxcb-devel
BuildRequires: libXcomposite-devel
BuildRequires: libXdamage-devel
BuildRequires: libxkbcommon-devel
BuildRequires: libxkbcommon-x11-devel
BuildRequires: libXrender-devel
BuildRequires: qt5-qttools-devel
BuildRequires: libqtxdg-devel
BuildRequires: gsettings-qt-devel
BuildRequires: poppler-devel
BuildRequires: poppler-qt5-devel
BuildRequires: libpeony-dev
BuildRequires: dconf-devel
BuildRequires: libpeony-dev
BuildRequires: libXtst-devel
BuildRequires: libudisks2-devel
BuildRequires: xcb-util-renderutil-devel
BuildRequires: xcb-util-image-devel
BuildRequires: libxcb-devel
BuildRequires: ukui-interface

Provides: ukui-indicators

Recommends: ukui-window-switch
Recommends: time-shutdown

%description
 The ukui desktop panel is used on ukui desktop and has some plugins like
 starmenu, quicklaunch and other useful tools.
 This package contains the ukui panel.

%prep
%setup -q
%patch01 -p1
%patch02 -p1
%patch03 -p1

%build
mkdir build && cd build
%{cmake3} ..

%install
rm -rf $RPM_BUILD_ROOT
cd %{_builddir}/%{name}-%{version}/build
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%files
%doc debian/copyright  debian/changelog
%{_sysconfdir}/xdg/autostart/*
%{_bindir}/*
%{_includedir}/ukui/*
%{_libdir}/*
%{_datadir}/*

%changelog
* Tue Jan 31 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.0-6
- fix nightnode button nodisplay

* Tue Jan 17 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.0-5
- fix translation of calendar

* Mon Jan 9 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.0-4
- fix translation problem of ukui-panel

* Thu Dec 08 2022 huayadong <huayadong@kylinos.cn> - 3.1.0-3
- delete  Recommends: libkysdk-system

* Thu Dec 8 2022 douyan <douyan@kylinos.cn> - 3.1.0-2
- update translation

* Wed Nov 9 2022 douyan <douyan@kylinos.cn> - 3.1.0-1
- update to upstream version 3.1.0-29

* Wed Apr 06 2022 huayadong <huayadong@kylinos.cn> - 3.0.2-12
- 优化预览窗口缩放机制和显示机制，为美观和显示比例考虑，减少最大窗口数从13减少为10个，解决单个小窗口缩放不协调的问题，解决窗口数过多时的图片缩放比例显示问题

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

* Sat Apr 02 2022 tanyulong <tanyulong@kylinos.cn> - 3.0.2-10
- add yaml file

* Fri Mar 25 2022 huayadong <huayadong@kylinos.cn> - 3.0.2-9
- change BuildRequires: pulseaudio-devel to pulseaudio-libs-devel

* Fri Nov 05 2021 tanyulong <tanyulong@kylinos.cn> - 3.0.2-8
- Added changelog file for easy viewing

* Tue Nov 02 2021 tanyulong <tanyulong@kylinos.cn> - 3.0.2-7
- add Storage arrow icon

* Sat Sep 18 2021 peijiankang <peijiankang@kylinos.cn> - 3.0.2-6
- Modify some modules translation error

* Wed Sep 08 2021 tanyulong <tanyulong@kylinos.cn> - 3.0.2-5
- Fixes an issue with a year jump exception

* Fri Dec 4 2020 lvhan <lvhan@kylinos.cn> - 3.0.2-4
- block taskbar right click

* Fri Dec 4 2020 lvhan <lvhan@kylinos.cn> - 3.0.2-3
- fix calendar

* Thu Dec 3 2020 douyan <douyan@kylinos.cn> - 3.0.2-2
- block calendar

* Mon Oct 26 2020 douyan <douyan@kylinos.cn> - 3.0.2-1
- update to upstream version 3.0.1-1+1028

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