File gtk2-engines.spec of Package gtk2-engines

#
# spec file for package gtk2-engines
#
# Copyright (c) 2011 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/
#

# norootforbuild


Name:           gtk2-engines
%define _name gtk-engines
BuildRequires:  fdupes
BuildRequires:  gtk2-devel
BuildRequires:  intltool
BuildRequires:  pkg-config
# See comment below on why this is disabled
#BuildRequires:  lua-devel
Summary:        Engines for GTK2 Themes
Version:        2.20.2
Release:        5
# FIXME: On new versions, check if bgo#607127 is solved, and if it is, enable
# the lua engine: uncomment lua-devel BuildRequires and configure options.
License:        LGPLv2.1+
Group:          System/GUI/GNOME
Source:         %{_name}-%{version}.tar.bz2
Source99:       baselibs.conf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# gnome-themes had Industrial before this version (<= SuSE Linux 9.2, <= NLD9).
Conflicts:      gnome-themes < 2.11.90
# We require the exact version of gtk2 we were compiled with since the engines are located in a versioned directory
%define gtk2_ver %(rpm -q --whatprovides --qf '%%{version}' gtk2)
Requires:       gtk2 == %{gtk2_ver}
Recommends:     %{name}-lang
Url:            http://www.gnome.org
Enhances:       gtk2
# Prevent missing engine failures on bi-arch systems:
%ifarch x86_64 s390x
Recommends:     %{name}-32bit = %{version}
%endif
Provides:       gtk2-engines-lang = 2.14.1
Obsoletes:      gtk2-engines-lang < 2.14.1
# bug437293
%ifarch ppc64
Obsoletes:      gnome-themes-64bit
Obsoletes:      gtk2-engines-64bit
%endif
#
Patch0:         gtk-engines-bnc546966-clearlooks-fix-main-menu-icon-size.patch

%description
This package contains the theme engine libraries for GTK2.

%package devel
Summary:        Development files for gtk2-engines
License:        LGPLv2.1+
Group:          Development/Libraries/GNOME
Requires:       %{name} = %{version}

%description devel
This package contains development files for gtk2-engines.

%lang_package
%prep
%setup -q -n %{_name}-%{version}
%patch0 -p1

%build
%configure \
        --enable-animation
#        --enable-lua \
#        --with-system-lua
make %{?jobs:-j%jobs}

%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
%find_lang %{_name}
rm $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/engines/*.*a

%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
# FIXME: Add also doc files from separate engines.
%doc AUTHORS COPYING ChangeLog NEWS README
%{_datadir}/themes/*
%{_datadir}/gtk-engines
%{_libdir}/gtk-2.0/*/engines/*.so

%files devel
%defattr(-, root, root)
%{_libdir}/pkgconfig/*.pc

%files lang -f %{_name}.lang

%changelog
openSUSE Build Service is sponsored by