File adapta-gtk-theme.spec of Package adapta-gtk-theme

#
# spec file for package adapta-gtk-theme
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All eodifications 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               adapta
%define         _theme              Adapta
%define         gtk3_min_version    3.18
%define         gtk2_min_version    2.24

Name:           adapta-gtk-theme
Version:        3.89.2.109
Release:        0
License:        GPL-2.0 and CC-BY-SA-4.0
Summary:        An adaptive Gtk+ theme based on Material Design Guidelines
Url:            https://github.com/adapta-project/adapta-gtk-theme
Group:          System/GUI/Other
Source:         %{name}-%{version}.tar.xz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  fdupes
BuildRequires:  inkscape
BuildRequires:  gdk-pixbuf-devel >= 2.32.2
BuildRequires:  gdk-pixbuf-loader-rsvg >= 2.32.2
BuildRequires:  gnu_parallel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(glib-2.0) >= 2.48.0
BuildRequires:  pkgconfig(librsvg-2.0) >= 2.40.13
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  sassc >= 3.3.2
BuildArch:      noarch

%description
Adapta is a GTK+ theme based on Material Design Guidelines that was
created based on Flat-Plat theme.

%package -n metatheme-%{_name}-common
Summary:        Adapta common theme files
Group:          System/GUI/Other

%description -n metatheme-%{_name}-common
Adapta is a GTK+ theme based on Material Design Guidelines that was
created based on Flat-Plat theme.

This package contains common files for all Adapta themes.

%package -n gtk2-metatheme-%{_name}
Summary:        Adapta GTK+2 themes
Group:          System/GUI/Other
Requires:       gtk2 >= %{gtk2_min_version}
Requires:       gtk2-engines
Requires:       metatheme-%{_name}-common = %{version}
Supplements:    packageand(metatheme-%{_name}-common:gtk2)

%description -n gtk2-metatheme-%{_name}
Adapta is a GTK+ theme based on Material Design Guidelines that was
created based on Flat-Plat theme.

This package contains the GTK2+ themes.

%package -n gtk3-metatheme-%{_name}
Summary:        Adapta GTK+3 themes
Group:          System/GUI/Other
Requires:       metatheme-%{_name}-common = %{version}
Requires:       gtk3 >= %{gtk3_min_version}
Supplements:    packageand(metatheme-%{_name}-common:gtk3)

%description -n gtk3-metatheme-%{_name}
Adapta is a GTK+ theme based on Material Design Guidelines that was
created based on Flat-Plat theme.

This package contains the GTK3+ themes.

%package -n metacity-theme-%{_name}
Summary:        Adapta Metacity themes
Group:          System/GUI/Other
Requires:       metatheme-%{_name}-common = %{version}
Requires:       metacity

%description -n metacity-theme-%{_name}
Adapta is a GTK+ theme based on Material Design Guidelines that was
created based on Flat-Plat theme.

This package contains the metacity themes.

%package -n cinnamon-theme-%{_name}
Summary:        Adapta Cinnamon themes
Group:          System/GUI/Other
Requires:       metatheme-%{_name}-common = %{version}
Requires:       cinnamon

%description -n cinnamon-theme-%{_name}
Adapta is a GTK+ theme based on Material Design Guidelines that was
created based on Flat-Plat theme.

This package contains the cinnamon themes.

%package -n gnome-shell-theme-adapta
Summary:        Adapta GNOME Shell themes
Group:          System/GUI/Other
Requires:       metatheme-%{_name}-common = %{version}
Requires:       noto-sans-fonts
Supplements:    packageand(metatheme-%{_name}-common:gnome-shell)

%description -n gnome-shell-theme-adapta
Adapta is a GTK+ theme based on Material Design Guidelines that was
created based on Flat-Plat theme.

This package contains the GNOME Shell themes.

%package -n xfwm4-theme-%{_name}
Summary:        Adapta Xfwm4 themes
Group:          System/GUI/Other
Requires:       metatheme-%{_name}-common = %{version}
Requires:       xfwm4

%description -n xfwm4-theme-%{_name}
Adapta is a GTK+ theme based on Material Design Guidelines that was
created based on Flat-Plat theme.

This package contains the Xfwm4 themes.

%package -n xfce4-notifyd-theme-%{_name}
Summary:        Adapta Xfce4 notifyd themes
Group:          System/GUI/Other
Requires:       metatheme-%{_name}-common = %{version}-%{release}
Requires:		xfce4-notifyd

%description -n xfce4-notifyd-theme-%{_name}
Adapta is a GTK+ theme based on Material Design Guidelines that was
created based on Flat-Plat theme.

This package contains the Xfce4 notifyd themes.

%package -n plank-theme-%{_name}
Summary:		Adapta Plank themes
Group:          System/GUI/Other
Requires:       metatheme-%{_name}-common = %{version}
Requires:       plank

%description -n plank-theme-%{_name}
Adapta is a GTK+ theme based on Material Design Guidelines that was
created based on Flat-Plat theme.

This package contains the Plank themes.

%package -n openbox-theme-%{_name}
Summary:		Adapta openbox themes
Group:          System/GUI/Other
Requires:       metatheme-%{_name}-common = %{version}
Requires:		openbox >= 3.6.1

%description -n openbox-theme-%{_name}
Adapta is a GTK+ theme based on Material Design Guidelines that was
created based on Flat-Plat theme.

This package contains the openbox themes.

%prep
%setup -q

%build
NOCONFIGURE=yes ./autogen.sh
%configure --prefix=%{_prefix} --disable-unity --disable-gtk_next --enable-plank --enable-chrome
make %{?_smp_mflags}

%install
%make_install
rm %{buildroot}%{_datadir}/themes/%{_theme}/index.theme
rm %{buildroot}%{_datadir}/themes/%{_theme}-Eta/index.theme
rm %{buildroot}%{_datadir}/themes/%{_theme}-Nokto/index.theme
rm %{buildroot}%{_datadir}/themes/%{_theme}-Nokto-Eta/index.theme

# Remove duplicated license files
rm %{buildroot}%{_datadir}/themes/%{_theme}/{COPYING,LICENSE_CC_BY_SA4,README.md}

# Remove duplicated files.
%fdupes %{buildroot}%{_datadir}/themes/

# Remove blank files
rm %{buildroot}%{_datadir}/themes/%{_theme}-Nokto/gedit
rm %{buildroot}%{_datadir}/themes/%{_theme}/gedit/README.md
rm %{buildroot}%{_datadir}/themes/%{_theme}/gedit/adapta.xml

%files -n metatheme-%{_name}-common
%defattr(-,root,root)
%doc COPYING LICENSE_CC_BY_SA4 README.md
%dir %{_datadir}/themes/%{_theme}/
%dir %{_datadir}/themes/%{_theme}-Eta/
%dir %{_datadir}/themes/%{_theme}-Nokto/
%dir %{_datadir}/themes/%{_theme}-Nokto-Eta/

%files -n gtk2-metatheme-%{_name}
%defattr(-,root,root)
%{_datadir}/themes/%{_theme}/gtk-2.0/
%{_datadir}/themes/%{_theme}-Eta/gtk-2.0/
%{_datadir}/themes/%{_theme}-Nokto/gtk-2.0/
%{_datadir}/themes/%{_theme}-Nokto-Eta/gtk-2.0/

%files -n gtk3-metatheme-%{_name}
%defattr(-,root,root)
%{_datadir}/themes/%{_theme}/gtk-3.*/
%{_datadir}/themes/%{_theme}-Eta/gtk-3.*
%{_datadir}/themes/%{_theme}-Nokto/gtk-3.*
%{_datadir}/themes/%{_theme}-Nokto-Eta/gtk-3.*

%files -n gnome-shell-theme-%{_name}
%defattr(-,root,root)
%{_datadir}/themes/%{_theme}/gnome-shell/
%{_datadir}/themes/%{_theme}-Nokto/gnome-shell/
%{_datadir}/themes/%{_theme}-Eta/gnome-shell/
%{_datadir}/themes/%{_theme}-Nokto-Eta/gnome-shell/

%files -n metacity-theme-%{_name}
%defattr(-,root,root)
%{_datadir}/themes/%{_theme}/metacity-1/
%{_datadir}/themes/%{_theme}-Eta/metacity-1
%{_datadir}/themes/%{_theme}-Nokto/metacity-1
%{_datadir}/themes/%{_theme}-Nokto-Eta/metacity-1

%files -n cinnamon-theme-%{_name}
%defattr(-,root,root)
%{_datadir}/themes/%{_theme}/cinnamon/
%{_datadir}/themes/%{_theme}-Nokto/cinnamon/

%files -n xfwm4-theme-%{_name}
%defattr(-,root,root)
%{_datadir}/themes/%{_theme}/xfwm4/
%{_datadir}/themes/%{_theme}-Nokto/xfwm4

%files -n xfce4-notifyd-theme-%{_name}
%defattr(-,root,root)
%{_datadir}/themes/%{_theme}/xfce-notify-4.0/

%files -n plank-theme-%{_name}
%defattr(-,root,root)
%{_datadir}/themes/%{_theme}/plank/
%{_datadir}/themes/%{_theme}-Eta/plank
%{_datadir}/themes/%{_theme}-Nokto/plank
%{_datadir}/themes/%{_theme}-Nokto-Eta/plank

%files -n openbox-theme-%{_name}
%defattr(-,root,root)
%{_datadir}/themes/%{_theme}/openbox-3/
%{_datadir}/themes/%{_theme}-Nokto/openbox-3/


%changelog
openSUSE Build Service is sponsored by