deepin-icon-theme/deepin-icon-theme.spec

80 lines
2.3 KiB
RPMSpec
Raw Normal View History

2023-10-10 14:18:17 +08:00
%global themes bloom bloom-dark bloom-classic bloom-classic-dark Sea
%global start_logo start-here
2020-07-14 11:09:27 +08:00
Name: deepin-icon-theme
2023-10-10 14:18:17 +08:00
Version: 2021.11.18
2023-11-17 15:00:59 +08:00
Release: 2
2020-07-14 11:09:27 +08:00
Summary: Icons for the Deepin Desktop Environment
License: GPLv3
URL: https://github.com/linuxdeepin/deepin-icon-theme
2023-10-10 14:18:17 +08:00
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
2020-07-14 11:09:27 +08:00
BuildArch: noarch
BuildRequires: gtk-update-icon-cache
BuildRequires: xorg-x11-apps
Requires: papirus-icon-theme
Conflicts: deepin-cursor-theme
%description
%{summary}.
%prep
2023-10-10 14:18:17 +08:00
%autosetup -p1 -n %{name}-%{version}
# no such theme
sed -i '/bloom-v20/d' Makefile
2020-07-14 11:09:27 +08:00
%build
2023-10-10 14:18:17 +08:00
%make_build
2020-07-14 11:09:27 +08:00
%install
2023-10-10 14:18:17 +08:00
make install-icons install-cursors DESTDIR=%{buildroot} PREFIX=%{_prefix}
cp -a ./Sea ./bloom-classic ./bloom-classic-dark ./usr/share/icons/hicolor %{buildroot}%{_datadir}/icons
for theme in %{themes}; do
for dir in %{buildroot}%{_datadir}/icons/$theme/places/*; do
size=$(basename $dir)
if [ -f %{_datadir}/icons/hicolor/${size}x${size}/places/%{start_logo}.png ]; then
ln -sf ../../../hicolor/${size}x${size}/places/%{start_logo}.png $dir
elif [ -f %{_datadir}/icons/hicolor/${size}/places/%{start_logo}.svg ]; then
ln -sf ../../../hicolor/${size}/places/%{start_logo}.svg $dir
fi
done
touch %{buildroot}%{_datadir}/icons/$theme/icon-theme.cache
done
2020-07-14 11:09:27 +08:00
%post
2023-10-10 14:18:17 +08:00
for theme in %{themes}; do
touch --no-create %{_datadir}/icons/$theme &>/dev/null || :
done
2020-07-14 11:09:27 +08:00
%postun
if [ $1 -eq 0 ] ; then
2023-10-10 14:18:17 +08:00
for theme in %{themes}; do
touch --no-create %{_datadir}/icons/$theme &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/$theme &>/dev/null || :
done
2020-07-14 11:09:27 +08:00
fi
%posttrans
2023-10-10 14:18:17 +08:00
for theme in %{themes}; do
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/$theme &>/dev/null || :
done
2020-07-14 11:09:27 +08:00
%files
%license LICENSE
2023-10-10 14:18:17 +08:00
%{_datadir}/icons/hicolor/*/status/*.svg
%{_datadir}/icons/hicolor/*/apps/*.svg
%{_datadir}/icons/bloom-dark/
2020-07-14 11:09:27 +08:00
%{_datadir}/icons/bloom/
%{_datadir}/icons/bloom-classic/
%{_datadir}/icons/bloom-classic-dark/
%{_datadir}/icons/Sea/
2023-10-10 14:18:17 +08:00
%{_datadir}/icons/Vintage/
%ghost %{_datadir}/icons/*/icon-theme.cache
2020-07-14 11:09:27 +08:00
%changelog
2023-11-17 15:00:59 +08:00
* Fri Nov 17 2023 hanshuang <hanshuang@uniontech.com> - 2021.11.18-2
- modify version info
2023-10-10 14:18:17 +08:00
* Tue Jun 14 2022 uoser <uoser@uniontech.com> - 2021.11.18-1.02
- update: update 2021.11.18-1.02