File kde3-gtk-qt-engine.spec of Package kde3-gtk-qt-engine

#
# spec file for package kde3-gtk-qt-engine (Version 0.8svn20071009)
#
# Copyright 2004-2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright 2007 dsbhayangkara@gmail.com
# Copyright 2009 Buschmann <buschmann23@opensuse.org>
#
# 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:           kde3-gtk-qt-engine
BuildRequires:  cmake gtk2-devel kdebase3 kdelibs3-devel kdesdk3 libbonoboui-devel
License:        GPL-2.0+
Group:          System/Libraries
Summary:        GTK-Style Engine for Use with Qt Plug-Ins and Settings
Version:        0.8svn20071009
Release:        1.1
Url:            http://gtk-qt.ecs.soton.ac.uk
Source:         gtk-qt-engine_0.8~svn-rev36.orig.tar.gz
Patch3:         hide-mozilla-groupbox.diff
Patch6:         fix-nspluginviewer-crash.diff
Patch7:         glib2.25-signals-conflict.patch
Patch8:         gtk-qt-engine-trinity-r1258270.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       gtk-qt-engine = 0.8svn20071009
Obsoletes:      gtk-qt-engine <= 0.8svn20071009

%description
This engine is for use by GTK applications running in KDE. It applies
all Qt settings to the GTK application and uses Qt style plug-ins
directly.

%define prefix /opt/kde3

%prep
%setup -q -n "gtk-qt-engine"
#%patch1 -p1
#%patch2
%patch3
# This code seems to have changed, need to check if the problem reoccurs
#%patch4
#. /etc/opt/kde3/common_options
#update_admin
#%patch5
sed -i 's/Icon=gnome_apps.png/Icon=gnome_apps/g' ./kcm_gtk/kcmgtk.desktop

%patch6
%patch7 -p1
%patch8 -p2
sed -i 's|glib/glist.h|glib.h|g' src/qt_theme_draw.c

%build
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$CFLAGS"
#mkdir build
#cd build
cmake -DCMAKE_INSTALL_PREFIX=%prefix -DCMAKE_BUILD_TYPE=debugfull .
make %{?jobs:-j %jobs}
#. /etc/opt/kde3/common_options
#./configure $configkde

%install
. /etc/opt/kde3/common_options
#cd build
make install DESTDIR=$RPM_BUILD_ROOT
# WS: what did this do?
#rm -rf $RPM_BUILD_ROOT/usr/lib
# WS: removing older version?
#rm $RPM_BUILD_ROOT/opt/gnome/%{_lib}/gtk-2.0/*/engines/libqtengine.la
# moving wrong default location?
# mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/applications
#cp $RPM_BUILD_ROOT/usr/share/applications/kcmgtk-xdg.desktop $RPM_BUILD_ROOT/opt/kde3/share/applications
kde_post_install
%find_lang gtkqtengine

%clean
rm -rf $RPM_BUILD_ROOT

%files -f gtkqtengine.lang
%defattr(-,root,root)
%doc AUTHORS README NEWS COPYING ChangeLog
%if %suse_version >= 1030
%_libdir/gtk-*/*/engines/*
/usr/share/themes/Qt
/usr/share/themes/Qt/gtk-*
/usr/share/themes/Qt/gtk-*/gtkrc
%else
/opt/gnome/%_lib/gtk-*/*/engines/*
/opt/gnome/share/themes/Qt
/opt/gnome/share/themes/Qt/gtk-*
/opt/gnome/share/themes/Qt/gtk-*/gtkrc
%endif
/opt/kde3/share/applications/*.desktop
/opt/kde3/%_lib/kde3/kcm_kcmgtk.*

%changelog
openSUSE Build Service is sponsored by