File ubuntu-themes.spec of Package ubuntu-themes

#
# spec file for package ubuntu-themes
#
# 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 _version 16.10+17.10.20170510
Name:           ubuntu-themes
Version:        16.10~bzr20170510
Release:        0
Summary:        Eyecandy from Ubuntu
License:        GPL-3.0+
Group:          System/GUI/Other
Url:            https://launchpad.net/ubuntu-themes
Source:         https://launchpad.net/ubuntu/+archive/primary/+files/%{name}_%{_version}.orig.tar.gz
# PATCH-FIX-UPSTREAM themes-mate-panel.patch sor.alexei@meowr.ru -- Add proper theming for mate-panel.
Patch0:         themes-mate-panel.patch
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  python-base
BuildRequires:  python-scour
BuildRequires:  python-xml
BuildArch:      noarch

%description
Ubuntu GNU/Linux basic artwork.

%package -n metatheme-ambiance-common
Summary:        Ambiance Gtk Theme -- Common Files
Group:          System/GUI/Other
Recommends:     humanity-icon-theme
Recommends:     ubuntu-mono-icon-theme
Suggests:       gtk2-metatheme-ambiance
Suggests:       gtk3-metatheme-ambiance

%description -n metatheme-ambiance-common
Includes an Ambiance light-on-dark theme.

Introduced as the default theme in Ubuntu 10.04 LTS.

%package -n metatheme-radiance-common
Summary:        Radiance Gtk Theme -- Common Files
Group:          System/GUI/Other
Recommends:     humanity-icon-theme
Recommends:     ubuntu-mono-icon-theme
Suggests:       gtk2-metatheme-radiance
Suggests:       gtk3-metatheme-radiance

%description -n metatheme-radiance-common
Includes an Radiance dark-on-light theme.

Introduced as one of the defaults in Ubuntu 10.04 LTS.

%package -n gtk2-metatheme-ambiance
Summary:        Ambiance Gtk Theme -- GTK+ 2 Support
Group:          System/GUI/Other
Requires:       gtk2-engine-murrine >= 0.90.3
Requires:       metatheme-ambiance-common = %{version}
Supplements:    packageand(metatheme-ambiance-common:gtk2)

%description -n gtk2-metatheme-ambiance
Includes an Ambiance light-on-dark theme.

Introduced as the default theme in Ubuntu 10.04 LTS.

%package -n gtk2-metatheme-radiance
Summary:        Radiance Gtk Theme -- GTK+ 2 Support
Group:          System/GUI/Other
Requires:       gtk2-engine-murrine >= 0.90.3
Requires:       metatheme-radiance-common = %{version}
Supplements:    packageand(metatheme-radiance-common:gtk2)

%description -n gtk2-metatheme-radiance
Includes an Radiance dark-on-light theme.

Introduced as one of the defaults in Ubuntu 10.04 LTS.

%package -n gtk3-metatheme-ambiance
Summary:        Ambiance Gtk Theme -- GTK+ 3 Support
Group:          System/GUI/Other
Requires:       metatheme-ambiance-common = %{version}
Supplements:    packageand(metatheme-ambiance-common:gtk3)

%description -n gtk3-metatheme-ambiance
Includes an Ambiance light-on-dark theme.

Introduced as the default theme in Ubuntu 10.04 LTS.

%package -n gtk3-metatheme-radiance
Summary:        Radiance Gtk Theme -- GTK+ 3 Support
Group:          System/GUI/Other
Requires:       metatheme-radiance-common = %{version}
Supplements:    packageand(metatheme-radiance-common:gtk3)

%description -n gtk3-metatheme-radiance
Includes an Radiance dark-on-light theme.

Introduced as one of the defaults in Ubuntu 10.04 LTS.

%package -n ubuntu-mono-icon-theme
Summary:        Ubuntu Mono Icon theme
Group:          System/X11/Icons
Requires:       adwaita-icon-theme
Requires:       hicolor-icon-theme
Requires:       humanity-icon-theme
Provides:       monochrome-icon-theme = %{version}
Provides:       ubuntu-mono = %{version}

%description -n ubuntu-mono-icon-theme
Dark and Light panel icons to make desktop beautiful.

%prep
%setup -q -c
%patch0 -p1
cp -f Ambiance/gtk-2.0/apps/mate-panel.rc Radiance/gtk-2.0/apps/mate-panel.rc

%build
make %{?_smp_mflags} V=1

%install
mkdir -p %{buildroot}%{_datadir}/themes/ %{buildroot}%{_datadir}/icons/
for theme in Ambiance Radiance; do
    cp -a $theme %{buildroot}%{_datadir}/themes/$theme
done
for icons in LoginIcons ubuntu-mono-dark ubuntu-mono-light; do
    cp -a $icons %{buildroot}%{_datadir}/icons/$icons
    # %%icon_theme_cache_create_ghost fails to work here.
    touch %{buildroot}%{_datadir}/icons/$icons/icon-theme.cache
done
find %{buildroot} -type f -name "*.orig" -delete -print
%fdupes %{buildroot}

%post -n ubuntu-mono-icon-theme
%icon_theme_cache_post LoginIcons
%icon_theme_cache_post ubuntu-mono-dark
%icon_theme_cache_post ubuntu-mono-light

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

%files -n metatheme-ambiance-common
%defattr(-,root,root)
%doc COPYING
%{_datadir}/themes/Ambiance/
%exclude %{_datadir}/themes/Ambiance/gtk-?.*/

%files -n metatheme-radiance-common
%defattr(-,root,root)
%doc COPYING
%{_datadir}/themes/Radiance/
%exclude %{_datadir}/themes/Radiance/gtk-?.*/

%files -n gtk2-metatheme-ambiance
%defattr(-,root,root)
%{_datadir}/themes/Ambiance/gtk-2.*/

%files -n gtk2-metatheme-radiance
%defattr(-,root,root)
%{_datadir}/themes/Radiance/gtk-2.*/

%files -n gtk3-metatheme-ambiance
%defattr(-,root,root)
%{_datadir}/themes/Ambiance/gtk-3.*/

%files -n gtk3-metatheme-radiance
%defattr(-,root,root)
%{_datadir}/themes/Radiance/gtk-3.*/

%files -n ubuntu-mono-icon-theme
%defattr(-,root,root)
%doc COPYING
%ghost %{_datadir}/icons/*/icon-theme.cache
%{_datadir}/icons/*/

%changelog
openSUSE Build Service is sponsored by