File gtk2-metatheme-sonar.spec of Package gtk2-metatheme-sonar

# spec file for package gtk2-metatheme-sonar
# Copyright (c) 2014 SUSE LINUX Products 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

Name:           gtk2-metatheme-sonar
Version:        11.3.0
Release:        0
%define _icon_version 11.3.1
Summary:        GTK+ and Metacity Sonar Theme
License:        GPL-2.0+
Group:          System/GUI/GNOME
Source0:        metatheme-Sonar-%{version}.tar.bz2
Source1:        icon-theme-sonar-%{_icon_version}.tar.bz2
# PATCH-FIX-OPENSUSE metatheme-Sonar_compatibilty-with-murrine-0.98.patch -- Remove deprecated gradients options, (deprecated with murrine version 0.98). Sent upstream by mail
Patch0:         metatheme-Sonar_compatibilty-with-murrine-0.98.patch
# PATCH-FIX-UPSTREAM gtk2-metatheme-sonar-main-menu-theming.patch bnc#642956 -- Correctly match the main menu button for correct theming
Patch1:         gtk2-metatheme-sonar-main-menu-theming.patch
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  icon-naming-utils
BuildRequires:  pkg-config
Requires:       gtk2-engine-murrine
Requires:       metatheme-sonar-common = %{version}
Enhances:       gtk2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

GTK+ and Metacity theme created for openSUSE 11.2.

%package -n metatheme-sonar-common
Summary:        GTK+ and Metacity Sonar Theme -- Common Files
Group:          System/GUI/GNOME
Recommends:     sonar-icon-theme
Suggests:       gtk2-metatheme-sonar

%description -n metatheme-sonar-common
GTK+ and Metacity theme created for openSUSE 11.2.

%package -n sonar-icon-theme
Version:        %{_icon_version}
Release:        0
Summary:        Sonar Icon Theme
Group:          System/GUI/GNOME
Requires:       hicolor-icon-theme
Suggests:       gtk2-metatheme-sonar
# Needed for old not-in-factory package
Provides:       icon-theme-sonar = 11.2.0
Obsoletes:      icon-theme-sonar < 11.2.0

%description -n sonar-icon-theme
Sonar icon theme based on the upcoming GNOME icon theme.

%setup -q -a1 -n Sonar
%patch0 -p1
%patch1 -p1

pushd icon-theme-sonar-%{_icon_version}
%__make %{?jobs:-j%jobs}

mkdir -p %{buildroot}%{_datadir}/themes/Sonar
cp -a gtk-2.0 metacity-1 index.theme %{buildroot}%{_datadir}/themes/Sonar/
# install icons
pushd icon-theme-sonar-%{_icon_version}
%icon_theme_cache_create_ghost Sonar
%fdupes %{buildroot}

rm -rf %{buildroot}

%post -n sonar-icon-theme
%icon_theme_cache_post Sonar

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

%defattr(-, root, root)

%files -n metatheme-sonar-common
%defattr(-, root, root)
%dir %{_datadir}/themes/Sonar

%files -n sonar-icon-theme
%defattr (644, root, root, 755)
%doc icon-theme-sonar-%{_icon_version}/AUTHORS icon-theme-sonar-%{_icon_version}/COPYING icon-theme-sonar-%{_icon_version}/NEWS icon-theme-sonar-%{_icon_version}/README
%ghost %{_datadir}/icons/Sonar/icon-theme.cache