File mate-themes.spec of Package mate-themes

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


# TODO: Split up packages into individual themes.
%define gtk3_version %(pkg-config --modversion gtk+-3.0 | awk -F. '{printf\("%%02d%%02d", $1, $2\)}')
Name:           mate-themes
Version:        3.22.11
Release:        0
Summary:        Themes for the MATE desktop
License:        LGPL-2.1+
Group:          System/GUI/Other
Url:            https://mate-desktop.org/
Source0:        http://pub.mate-desktop.org/releases/themes/3.22/%{name}-%{version}.tar.xz
Source1:        http://pub.mate-desktop.org/releases/themes/3.20/%{name}-3.20.20.tar.xz
Source2:        http://pub.mate-desktop.org/releases/themes/3.16/%{name}-3.16.6.tar.xz
Source3:        http://pub.mate-desktop.org/releases/themes/3.14/%{name}-3.14.6.tar.xz
BuildRequires:  awk
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  mate-common
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.14
Requires:       gtk2-engine-clearlooks
Requires:       gtk2-engine-hcengine
Requires:       gtk2-engine-murrine
Obsoletes:      %{name}-lang
BuildArch:      noarch

%description
Official themes for the MATE desktop

This package contains the official desktop themes of the MATE
desktop environment.

%prep
%if 0%{?gtk3_version} >= 0322
%setup -q
%else
%if 0%{?gtk3_version} >= 0320
%setup -q -T -n %{name}-3.20.20 -b1
%else
%if 0%{?gtk3_version} >= 0316
%setup -q -T -n %{name}-3.16.6 -b2
%else
%setup -q -T -n %{name}-3.14.6 -b3
%endif
%endif
%endif

%build
NOCONFIGURE=1 mate-autogen
%configure \
  --enable-all-themes
make %{?_smp_mflags} V=1

%install
%make_install

%icon_theme_cache_create_ghost ContrastHigh
%fdupes %{buildroot}%{_datadir}/

%post
%icon_theme_cache_post ContrastHigh

%postun
%icon_theme_cache_postun ContrastHigh

%files
%defattr(-,root,root)
%doc COPYING NEWS README
# GTK+ themes.
%{_datadir}/themes/BlackMATE/
%{_datadir}/themes/BlueMenta/
%{_datadir}/themes/Blue-Submarine/
%{_datadir}/themes/ContrastHighInverse/
%{_datadir}/themes/Green-Submarine/
%{_datadir}/themes/GreenLaguna/
%{_datadir}/themes/HighContrast/
%{_datadir}/themes/Menta/
%{_datadir}/themes/Shiny/
%{_datadir}/themes/TraditionalOk/
%{_datadir}/themes/TraditionalGreen/
%if 0%{?gtk3_version} < 0320
%{_datadir}/themes/ContrastHigh/
%{_datadir}/themes/TraditionalOkTest/
%endif
# Icon sets.
%{_datadir}/icons/ContrastHigh/
%ghost %{_datadir}/icons/ContrastHigh/icon-theme.cache
# Cursor themes.
%dir %{_datadir}/icons/mate/
%{_datadir}/icons/mate/cursors/

%changelog