File yaru-theme.spec of Package yaru-theme

#
# spec file for package yaru-theme
#
# Copyright (c) 2018 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   yaru
Name:           yaru-theme
Version:        21.10.2
Release:        0
Summary:        Yaru theme from the Ubuntu community
License:        GPL-3.0-or-later AND LGPL-2.1-only AND LGPL-3.0-only AND CC-BY-SA-4.0
Group:          System/GUI/Other
URL:            https://community.ubuntu.com/c/desktop/theme-refresh
Source:         https://github.com/ubuntu/yaru/archive/%{version}.tar.gz#/%{_name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(appstream-glib)
BuildRequires:  meson
BuildRequires:  sassc
Requires:       metatheme-yaru-common
BuildArch:      noarch

%description
This is the theme shaped by the community on the Ubuntu hub.

%package -n metatheme-yaru-common
Summary:        Common files for the Yaru Gtk Theme
Group:          System/GUI/Other
Recommends:     sound-theme-yaru
Recommends:     yaru-icon-theme

%description -n metatheme-yaru-common
This is the theme shaped by the community on the Ubuntu hub.

%package -n gtk2-metatheme-yaru
Summary:        GTK+ 2 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk2-theming-engine-adwaita
Requires:       metatheme-yaru-common = %{version}

%description -n gtk2-metatheme-yaru
This is the theme shaped by the community on the Ubuntu hub.

%package -n gtk3-metatheme-yaru
Summary:        GTK+ 3 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk3
Requires:       metatheme-yaru-common = %{version}

%description -n gtk3-metatheme-yaru
This is the theme shaped by the community on the Ubuntu hub.

%package -n gtk4-metatheme-yaru
Summary:        GTK+ 4 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk4
Requires:       metatheme-yaru-common = %{version}

%description -n gtk4-metatheme-yaru
This is the theme shaped by the community on the Ubuntu hub.

%package -n metacity-yaru-dark
Summary:        GTK+ 2 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk2-theming-engine-adwaita
Requires:       metatheme-yaru-common = %{version}

%description -n metacity-yaru-dark
This is the theme shaped by the community on the Ubuntu hub.

%package -n gtk2-metatheme-yaru-dark
Summary:        GTK+ 2 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk2-theming-engine-adwaita
Requires:       metatheme-yaru-common = %{version}

%description -n gtk2-metatheme-yaru-dark
This is the theme shaped by the community on the Ubuntu hub.

%package -n gtk3-metatheme-yaru-dark
Summary:        GTK+ 3 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk3
Requires:       metatheme-yaru-common = %{version}

%description -n gtk3-metatheme-yaru-dark
This is the theme shaped by the community on the Ubuntu hub.

%package -n gtk4-metatheme-yaru-dark
Summary:        GTK+ 4 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk3
Requires:       metatheme-yaru-common = %{version}

%description -n gtk4-metatheme-yaru-dark
This is the theme shaped by the community on the Ubuntu hub.

%package -n metacity-yaru-mate
Summary:        GTK+ 2 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       metatheme-yaru-common = %{version}

%description -n metacity-yaru-mate
This is the theme shaped by the community on the Ubuntu hub.

%package -n gtk2-metatheme-yaru-mate
Summary:        GTK+ 2 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk2-theming-engine-adwaita
Requires:       metatheme-yaru-common = %{version}

%description -n gtk2-metatheme-yaru-mate
This is the theme shaped by the community on the Ubuntu hub.

%package -n gtk3-metatheme-yaru-mate
Summary:        GTK+ 3 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk3
Requires:       metatheme-yaru-common = %{version}

%description -n gtk3-metatheme-yaru-mate
This is the theme shaped by the community on the Ubuntu hub.

%package -n gtk4-metatheme-yaru-mate
Summary:        GTK+ 4 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk4
Requires:       metatheme-yaru-common = %{version}

%description -n gtk4-metatheme-yaru-mate
This is the theme shaped by the community on the Ubuntu hub.

%package -n metacity-yaru-mate-dark
Summary:        GTK+ 2 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk2-theming-engine-adwaita
Requires:       metatheme-yaru-common = %{version}

%description -n metacity-yaru-mate-dark
This is the theme shaped by the community on the Ubuntu hub.


%package -n gtk2-metatheme-yaru-mate-dark
Summary:        GTK+ 2 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk2-theming-engine-adwaita
Requires:       metatheme-yaru-common = %{version}

%description -n gtk2-metatheme-yaru-mate-dark
This is the theme shaped by the community on the Ubuntu hub.

%package -n gtk3-metatheme-yaru-mate-dark
Summary:        GTK+ 3 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk3
Requires:       metatheme-yaru-common = %{version}

%description -n gtk3-metatheme-yaru-mate-dark
This is the theme shaped by the community on the Ubuntu hub.

%package -n gtk4-metatheme-yaru-mate-dark
Summary:        GTK+ 4 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       gtk4
Requires:       metatheme-yaru-common = %{version}

%description -n gtk4-metatheme-yaru-mate-dark
This is the theme shaped by the community on the Ubuntu hub.

%package -n xfwm4-theme-yaru-dark
Summary:        Xfwm4 support for the Yaru Gtk Theme
Group:          System/GUI/Other
Requires:       metatheme-yaru-common = %{version}

%description -n xfwm4-theme-yaru-dark
This is the theme shaped by the community on the Ubuntu hub.

%package -n yaru-icon-theme
Summary:        Yaru icon theme
License:        CC-BY-SA-4.0
Group:          System/X11/Icons
Requires:       hicolor-icon-theme
Requires:       humanity-icon-theme

%description -n yaru-icon-theme
This is the theme shaped by the community on the Ubuntu hub.

This package contains the icon theme.

%package -n yaru-mate-icon-theme
Summary:        Yaru icon theme
License:        CC-BY-SA-4.0
Group:          System/X11/Icons
Requires:       hicolor-icon-theme
Requires:       humanity-icon-theme

%description -n yaru-mate-icon-theme
This is the theme shaped by the community on the Ubuntu hub.

This package contains the icon theme.

%package -n yaru-gnome-shell-theme
Summary:        Yaru gnome-shell theme
License:        CC-BY-SA-4.0
Group:          System/GUI/Other
Requires:       humanity-icon-theme

%description -n yaru-gnome-shell-theme
This is the gnome-shell theme shaped by the community on the Ubuntu hub.

This package contains the gnome-shell theme.

%package -n sound-theme-yaru
Summary:        Yaru sound theme
License:        CC-BY-SA-4.0
Group:          System/Libraries
Requires:       canberra-gtk-play-gnome

%description -n sound-theme-yaru
This is the theme shaped by the community on the Ubuntu hub.

This package contains the sound theme following the XDG theming
specification.

%prep
%autosetup -n %{_name}-%{version} -p1

%build
%meson \
 -Dmate=true \
 -Dmate-dark=true \
 -Dxfwm4=true
%meson_build

%install
%meson_install
find {*.md,AUTHORS} -type f -perm /111 -exec chmod 644 {} \;

rm %{buildroot}%{_datadir}/glib-2.0/schemas/99_Yaru.gschema.override \
   %{buildroot}%{_datadir}/wayland-sessions/Yaru.desktop \
   %{buildroot}%{_datadir}/xsessions/Yaru-xorg.desktop \
   %{buildroot}%{_datadir}/gnome-shell/extensions/ubuntu-dock@ubuntu.com/yaru.css
  
%fdupes %{buildroot}%{_prefix}

%if 0%{?suse_version} < 1500
%post -n yaru-icon-theme
%icon_theme_cache_post Yaru

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

%files -n metatheme-yaru-common
%license COPYING* LICENSE_CCBYSA
%doc AUTHORS CONTRIBUTING.md README.md
%{_datadir}/themes/Yaru
%dir %{_datadir}/gtksourceview-2.0
%dir %{_datadir}/gtksourceview-3.0
%dir %{_datadir}/gtksourceview-4
%dir %{_datadir}/gtksourceview-2.0/styles
%dir %{_datadir}/gtksourceview-3.0/styles
%dir %{_datadir}/gtksourceview-4/styles
%{_datadir}/themes/Yaru-dark/index.theme
%exclude %{_datadir}/themes/Yaru/gnome-shell
%exclude %{_datadir}/themes/Yaru/gtk-2.*/
%exclude %{_datadir}/themes/Yaru-dark/gtk-2.*/
%exclude %{_datadir}/themes/Yaru/gtk-3.*/
%exclude %{_datadir}/themes/Yaru-dark/gtk-3.*/
%exclude %{_datadir}/themes/Yaru/gtk-4.0/
%exclude %{_datadir}/themes/Yaru-dark/gtk-4.0/
%exclude %{_datadir}/themes/Yaru-mate/gtk-2.*/
%exclude %{_datadir}/themes/Yaru-mate/gtk-3.*/
%exclude %{_datadir}/themes/Yaru-mate/gtk-4.0/

%files -n gtk2-metatheme-yaru
%{_datadir}/themes/Yaru/gtk-2.*/
%{_datadir}/gtksourceview-2.0/styles/Yaru.xml
%{_datadir}/gtksourceview-2.0/styles/Yaru-dark.xml

%files -n gtk3-metatheme-yaru
%{_datadir}/themes/Yaru/gtk-3.*/
%{_datadir}/gtksourceview-3.0/styles/Yaru-dark.xml
%{_datadir}/gtksourceview-3.0/styles/Yaru.xml

%files -n gtk4-metatheme-yaru
%{_datadir}/themes/Yaru/gtk-4.*/
%{_datadir}/gtksourceview-4/styles/Yaru.xml

%files -n metacity-yaru-dark
%{_datadir}/themes/Yaru-dark/metacity-1/

%files -n gtk2-metatheme-yaru-dark
%{_datadir}/themes/Yaru-dark/gtk-2.*/

%files -n gtk3-metatheme-yaru-dark
%{_datadir}/themes/Yaru-dark/gtk-3.*/

%files -n gtk4-metatheme-yaru-dark
%dir %{_datadir}/themes/Yaru-dark
%{_datadir}/themes/Yaru-dark/gtk-4.*/
%{_datadir}/gtksourceview-4/styles/Yaru-dark.xml

%files -n yaru-icon-theme
%license COPYING* LICENSE_CCBYSA
%doc AUTHORS CONTRIBUTING.md README.md
%ghost %{_datadir}/icons/Yaru/icon-theme.cache
%{_datadir}/icons/Yaru/
%exclude %{_datadir}/icons/Yaru-mate/

%files -n yaru-mate-icon-theme
%license COPYING* LICENSE_CCBYSA
%doc AUTHORS CONTRIBUTING.md README.md
%ghost %{_datadir}/icons/Yaru-mate/icon-theme.cache
%{_datadir}/icons/Yaru-mate/

%files -n yaru-gnome-shell-theme
%{_datadir}/gnome-shell/
%dir %{_datadir}/themes/Yaru-light
%{_datadir}/themes/Yaru-light/gnome-shell
%{_datadir}/themes/Yaru/gnome-shell

%files -n metacity-yaru-mate
%dir %{_datadir}/themes/Yaru-mate
%{_datadir}/themes/Yaru-mate/index.theme
%{_datadir}/themes/Yaru-mate/metacity-1/

%files -n gtk2-metatheme-yaru-mate
%{_datadir}/themes/Yaru-mate/gtk-2.*/
%{_datadir}/gtksourceview-2.0/styles/Yaru-mate.xml

%files -n gtk3-metatheme-yaru-mate
%{_datadir}/themes/Yaru-mate/gtk-3.*/
%{_datadir}/gtksourceview-3.0/styles/Yaru-mate.xml

%files -n gtk4-metatheme-yaru-mate
%{_datadir}/themes/Yaru-mate/gtk-4.*/
%{_datadir}/gtksourceview-4/styles/Yaru-mate.xml

%files -n metacity-yaru-mate-dark
%dir %{_datadir}/themes/Yaru-mate-dark
%{_datadir}/themes/Yaru-mate-dark/index.theme
%{_datadir}/themes/Yaru-mate-dark/metacity-1/

%files -n gtk2-metatheme-yaru-mate-dark
%{_datadir}/themes/Yaru-mate-dark/gtk-2.*/
%{_datadir}/gtksourceview-2.0/styles/Yaru-mate-dark.xml

%files -n gtk3-metatheme-yaru-mate-dark
%{_datadir}/themes/Yaru-mate-dark/gtk-3.*/
%{_datadir}/gtksourceview-3.0/styles/Yaru-mate-dark.xml

%files -n gtk4-metatheme-yaru-mate-dark
%{_datadir}/themes/Yaru-mate-dark/gtk-4.*/
%{_datadir}/gtksourceview-4/styles/Yaru-mate-dark.xml

%files -n xfwm4-theme-yaru-dark
%{_datadir}/themes/Yaru-dark/xfwm4/

%files -n sound-theme-yaru
%license COPYING* LICENSE_CCBYSA
%doc AUTHORS CONTRIBUTING.md README.md
%{_datadir}/sounds/Yaru/

%changelog
openSUSE Build Service is sponsored by