File la-capitaine-icon-theme.spec of Package la-capitaine-icon-theme

#
# spec file for package la-capitaine-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/
#


Name:           la-capitaine-icon-theme
Version:        @SERVICE@
Release:        0
Summary:        La Capitain icon theme
License:        MIT and GPL-3.0
Group:          System/GUI/Other
Url:            https://github.com/keeferrourke/la-capitaine-icon-theme
Source:         %{name}-%{version}.tar.xz
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  lsb-release
BuildRoot:      %{_tmppath}/%{name}-%{version}-build                            
BuildArch:      noarch

%description
La Capitaine is an icon pack designed to integrate with most desktop
environments. The set of icons takes inspiration from the latest iterations of
macOS and Google's Material Design.

%prep
%setup -q
sed -i "s|^wd=.*$|wd=\$ICONDIR|" ./configure

%build
./configure ICONDIR="%{_datadir}/icons/%{name}"

%install
install -dm 0755 %{buildroot}%{_datadir}/icons/%{name}
for folder in $(find -maxdepth 1 -type d | sed '/^\.$/d') ; do
  cp -a $folder %{buildroot}%{_datadir}/icons/%{name}/
done
install -Dm 0644 index.theme %{buildroot}%{_datadir}/icons/%{name}/index.theme
%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 COPYING LICENSE README.md
%{_datadir}/icons/%{name}
%ghost %{_datadir}/icons/%{name}/icon-theme.cache

%changelog
openSUSE Build Service is sponsored by