Name:		kiran-wallpapers
Version:	0.8.1
Release:	1%{?dist}.kb12
Summary:	Wallpapers for Kiran desktop

License:	LGPLv2+
URL:		http://www.kylinsec.com.cn
Source0:	%{name}-%{version}.tar.gz

Patch0001:	0001-Replace-the-default.jpg-file-of-the-default-wallpape.patch
Patch1002:	0001-Remove-duplicate-wallpaper-sky.png-in-appearance-pre-52473ddd.patch
Patch1003:	0002-Add-a-new-wallpaper-default.jpg-in-appearance-prefer-4ce03690.patch

BuildRequires:  git

Conflicts:	kiran-themes < 0.8.1
BuildArch:	noarch

#由于/usr/share/background/default.jpg与openEluer-logo冲突,特殊处理
%define BuildForOpenEluer true

%description
This package provides desktop wallpapers for kiran desktop


%prep
%setup -q
git apply $RPM_SOURCE_DIR/0001-Replace-the-default.jpg-file-of-the-default-wallpape.patch
%patch1002 -p1
%patch1003 -p1

%build

%install
mkdir -p $RPM_BUILD_ROOT/usr/share/backgrounds/kiran/
mkdir -p $RPM_BUILD_ROOT/usr/share/mate-background-properties/
mkdir -p $RPM_BUILD_ROOT/usr/share/locale/zh_CN/LC_MESSAGES/
cp -r $RPM_BUILD_DIR/%{name}-%{version}/kiran.xml $RPM_BUILD_ROOT/usr/share/backgrounds/
cp -r $RPM_BUILD_DIR/%{name}-%{version}/*.jpg $RPM_BUILD_ROOT/usr/share/backgrounds/kiran/
cp -r $RPM_BUILD_DIR/%{name}-%{version}/*.png $RPM_BUILD_ROOT/usr/share/backgrounds/kiran/
cp -r $RPM_BUILD_DIR/%{name}-%{version}/kiran_background.xml $RPM_BUILD_ROOT/usr/share/mate-background-properties/
cp -r $RPM_BUILD_DIR/%{name}-%{version}/mate-backgrounds.mo $RPM_BUILD_ROOT/usr/share/locale/zh_CN/LC_MESSAGES/

%if %{BuildForOpenEluer}==true 
cp -r $RPM_BUILD_DIR/%{name}-%{version}/default.jpg $RPM_BUILD_ROOT/usr/share/backgrounds/default_kiran.jpg
%else
cp -r $RPM_BUILD_DIR/%{name}-%{version}/default.jpg $RPM_BUILD_ROOT/usr/share/backgrounds/default.jpg
%endif

%files
%doc
%{_datadir}/backgrounds/
%{_datadir}/mate-background-properties/
%{_datadir}/locale/zh_CN/LC_MESSAGES/

%changelog
* Thu Oct 28 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 0.8.1-1.kb12
- KYOS-R: Rename default.jpg to default_ kiran.jpg(#45551)

* Thu Jul 15 2021 longcheng <longcheng@kylinos.com.cn> - 0.8.1-1.kb11
- KYOS-P: Remove duplicate wallpaper sky.png in appearance preferences (#41117)
- KYOS-P: Add a new wallpaper default.jpg in appearance preferences (#41117)

* Tue May 25 2021 caoyuanji<caoyuanji@kylinos.com.cn> - 0.8.1-1.kb10
- KYOS-P: Replace the default.jpg file of the default wallpaper .(Related: #39030)

* Mon May 10 2021 kpkg <kpkg@kylinos.com.cn> - 0.8.1-1.kb9
- rebuild for KY3.4-4

* Wed Nov 10 2020 ouyangminxiang <ouyangminxiang@kylinos.com.cn> - 0.8.1-1.ky3.kb8
- KYOS-P: add some wallpaper pictures
- Related: #31702

* Wed Aug 26 2020 zhoujieda <zhoujieda@kylinos.com.cn> - 0.8.1-1.ky3.kb6
- KYOS-F:remove scripts and add default jpg link in install.(#28956)

* Wed Jul 29 2020 zhoujieda <zhoujieda@kylinos.com.cn> - 0.8.1-1.ky3.kb5
- KYOS-P:change the earth wallpapers

* Mon Jul 06 2020 zhoujieda <zhoujieda@kylinos.com.cn> - 0.8.1-1.ky3.kb4
- KYOS-P:add new wallpapers and change wallpapers name

* Fri Jul 03 2020 zhoujieda <zhoujieda@kylinos.com.cn> - 0.8.1-1.ky3.kb3
- KYOS-F:add symbolic link for default.jpg

* Tue Jun 30 2020 zhoujieda <zhoujieda@kylinos.com.cn> - 0.8.1-1.ky3.kb2
- KYOS-B:Add kiran wallpapers into background optinos
- Related:#27537

* Fri May 29 2020 songchuanfei <songchuanfei@kylinos.com.cn> - 0.8.1-1.ky3.kb1
- KYOS-P: New style wallpapers

* Fri Jan 17 2020 liaowei <liaowei@kylinos.com.cn> - 0.8.0-5.ky3.kb3
- KYOS-B: replace default wallpapers
