File deepin-icon-theme.spec of Package deepin-icon-theme
#
# spec file for package deepin-icon-theme
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define name1 deepin-launcher
%define deepin_launcher_version 4.6.14
#%%(rpm -q --queryformat '%%{VERSION}' deepin-launcher)
Name: deepin-icon-theme
Version: @SERVICE@
Release: 0
Summary: Icons Theme
License: GPL-3.0-or-later
Group: System/GUI/Other
URL: https://github.com/linuxdeepin/deepin-icon-theme
Source: %{name}-%{version}.tar.xz
Patch0: deepin-icon-theme_fix-makefile.patch
BuildRequires: fdupes
BuildRequires: gtk3-tools
BuildRequires: hicolor-icon-theme
BuildRequires: python
BuildRequires: xcursorgen
Requires(post): gtk3-tools
Requires: hicolor-icon-theme
Suggests: papirus-icon-theme
BuildArch: noarch
%description
Icons for the Deepin Desktop Environment.
%package -n deepin-launcher-branding-upstream
Summary: Upstream branding for deepin-launcher
Version: %{deepin_launcher_version}
#uildRequires: deepin-launcher
Requires: %{name1} = %{version}
Provides: %{name1}-branding = %{version}
Conflicts: otherproviders(%{name1}-branding)
Supplements: packageand(deepin-launcher:branding-upstream)
%description -n deepin-launcher-branding-upstream
Upstream branding for deepin-launcher icon.
%prep
%autosetup -p1
#sed -i 's/deepin/bloom/g' Sea/index.theme
%build
%make_build
%install
%make_install PREFIX=%{_prefix}
rm -rf %{buildroot}%{_datadir}/icons/bloom/cursors
rm -fv %{buildroot}%{_datadir}/icons/bloom/cursors.theme
sed -i 's/bloom-classic/deepin/' %{buildroot}%{_datadir}/icons/deepin/index.theme
sed -i 's/bloom-classic/deepin-dark/' %{buildroot}%{_datadir}/icons/deepin-dark/index.theme
# fix duplicate files
%fdupes %{buildroot}%{_datadir}/icons/
%icon_theme_cache_create_ghost bloom
%icon_theme_cache_create_ghost bloom-dark
%icon_theme_cache_create_ghost deepin
%icon_theme_cache_create_ghost deepin-dark
%icon_theme_cache_create_ghost Sea
%post
%icon_theme_cache_post bloom
%icon_theme_cache_post bloom-dark
%icon_theme_cache_post deepin
%icon_theme_cache_post deepin-dark
%icon_theme_cache_post Sea
# No need for %%icon_theme_cache_postun in %%postun since the theme won't exist anymore
%files
%doc CHANGELOG.md
%{_datadir}/icons/bloom
%{_datadir}/icons/bloom-dark
%ghost %{_datadir}/icons/bloom*/icon-theme.cache
%{_datadir}/icons/deepin
%{_datadir}/icons/deepin-dark
%ghost %{_datadir}/icons/deepin*/icon-theme.cache
%{_datadir}/icons/Sea
%ghost %{_datadir}/icons/Sea/icon-theme.cache
%{_datadir}/icons/hicolor/*/*/*.??g
%exclude %{_datadir}/icons/deepin/places/*/deepin-launcher.svg
%exclude %{_datadir}/icons/deepin-dark/places/*/deepin-launcher.svg
%license LICENSE
%files -n deepin-launcher-branding-upstream
%{_datadir}/icons/deepin/places/*/deepin-launcher.svg
%{_datadir}/icons/deepin-dark/places/*/deepin-launcher.svg
%changelog