File kde-gtk-config.spec of Package kde-gtk-config4

#
# spec file for package kde-gtk-config
#
# Copyright (c) 2013 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 http://bugs.opensuse.org/
#


Name:           kde-gtk-config
Version:        2.2.1
Release:        0
Summary:        KCM Module to Configure GTK2 and GTK3 Applications Appearance Under KDE
License:        LGPL-3.0+ and GPL-3.0+
Group:          System/GUI/KDE
Url:            https://projects.kde.org/projects/playground/base/kde-gtk-config/
Source0:        ftp://ftp.kde.org/pub/kde/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz
Source1:        kde_gtk_config.suse.sh
Source2:        gtkrc-2.0-kde4.template
Source3:        gtk3-settings.ini-kde4.template
Patch0:         fix-build.patch
# PATCH-FIX-UPSTREAM
Patch1:         Also-list-GTK3-themes-without-gtk-3.0-subfolder.patch
# PATCH-FIX-UPSTREAM
Patch2:         Fix-build-with-pango-1.4.patch
BuildRequires:  pkgconfig(atk)
BuildRequires:  cairo-devel
BuildRequires:  gdk-pixbuf-devel
BuildRequires:  gtk2-devel
BuildRequires:  gtk3-devel
BuildRequires:  libkde4-devel
BuildRequires:  pango-devel
%kde4_runtime_requires
Recommends:     %{name}-lang = %{version}
Suggests:       gtk2-theme-oxygen
Suggests:       gtk3-theme-oxygen
Obsoletes:      kcm_gtk
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
kde-gtk-config is a KCM module to configure GTK2 and GTK3 applications
appearance under KDE.

Among its many features, it lets you:
 - Choose which theme is used for GTK2 and GTK3 applications.
 - Tweak some GTK applications behaviour.
 - Select what icon theme to use in GTK applications.
 - Select GTK applications default fonts.
 - Easily browse and install new GTK2 and GTK3 themes.

%lang_package

%prep
%setup -q
%if 0%{?suse_version} > 1320 || 0%{?sle_version} > 120100
%patch0 -p1
%endif
%patch1 -p1
%patch2 -p1
# outdated, doesn't work with latest pango 1.4, and is actually available in cmake itself since ages
rm cmake/modules/FindGTK2.cmake

%build
%cmake_kde4 -d build
%make_jobs

%install
%kde4_makeinstall -C build

install -Dpm 0755 %{SOURCE1} %{buildroot}%{_kde4_sharedir}/env/kde_gtk_config.suse.sh
install -Dpm 0644 %{SOURCE2} %{buildroot}%{_kde4_appsdir}/%{name}/gtkrc-2.0-kde4.template
install -Dpm 0644 %{SOURCE3} %{buildroot}%{_kde4_appsdir}/%{name}/gtk3-settings.ini-kde4.template

%kde_post_install

%find_lang %{name}

%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog README
%{_kde4_appsdir}/kcm-gtk-module/
%{_kde4_appsdir}/kde-gtk-config/
%{_kde4_libexecdir}/gtk_preview
%{_kde4_libexecdir}/gtk3_preview
%{_kde4_libexecdir}/reload_gtk_apps
%{_kde4_configdir}/*.knsrc
%{_kde4_iconsdir}/hicolor/*x*/apps/*.png
%dir %{_kde4_sharedir}/env
%{_kde4_sharedir}/env/kde_gtk_config.suse.sh
%{_kde4_modulesdir}/kcm_cgc.so
%{_kde4_servicesdir}/kde-gtk-config.desktop

%files lang -f %{name}.lang
%defattr(-,root,root,-)

%changelog
openSUSE Build Service is sponsored by