File rosa-icon-theme.spec of Package rosa-icon-theme

#
# spec file for package rosa-icon-theme
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


%define  _name  ROSA
# If packages are targeted for anything other than openSUSE
%{?!icon_theme_cache_create_ghost:%define icon_theme_cache_create_ghost() touch %{buildroot}%{_datadir}/icons/%1/icon-theme.cache}
%{?!icon_theme_cache_post:%define icon_theme_cache_post() gtk-update-icon-cache %{_datadir}/icons/%1 &> /dev/null || :}
Name:           rosa-icon-theme
Version:        1.1.20
Release:        0
Summary:        ROSA icon theme
License:        GPL-2.0
Group:          System/GUI/Other
Url:            https://abf.io/uxteam/rosa-icons-devel
Source:         %{name}-%{version}.tar.xz
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRoot:      %{_tmppath}/%{name}-%{version}-build                            
BuildArch:      noarch

%description
ROSA icon theme is high quality icon theme for KDE, GNOME and Xfce.
It is part of ROSA theme pack - theme for ROSA Desktop distribution.
Initially based on the original icon theme Elementary by Daniel Fore
(Dan Rabbit).

%prep
%setup -q

%build

%install
install -dm 0755 %{buildroot}%{_datadir}/icons/%{_name}
for folder in $(find -maxdepth 1 -type d | xargs basename -a | sed '/\./d') ; do
  cp -a $folder %{buildroot}%{_datadir}/icons/%{_name}/
done
install -Dm 0644 index.theme %{buildroot}%{_datadir}/icons/%{_name}/index.theme
find %{buildroot}%{_datadir}/icons/%{_name}/ -type f -name '\.*' -print -delete
%icon_theme_cache_create_ghost %{_name}
%fdupes %{buildroot}%{_datadir}/icons/%{_name}

%post
%icon_theme_cache_post %{_name}

# No need for %%icon_theme_cache_postun in %%postun since the theme won't exist anymore.

%files
%defattr(0644,root,root,0755)
%doc AUTHORS CONTRIBUTORS COPYING
%{_datadir}/icons/%{_name}
%ghost %{_datadir}/icons/%{_name}/icon-theme.cache

%changelog
openSUSE Build Service is sponsored by