File kde3-kgtk.spec of Package kde3-kgtk

#
# spec file for package kde3-kgtk (Version 0.10.1)
#
# Copyright (c) 2009 Kyrill Detinov
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

# norootforbuild

%define _prefix /opt/kde3

Name:           kde3-kgtk
Version:	0.10.1
Release:	0
License:	GPL-2.0
URL:		http://www.kde-apps.org/content/show.php/KGtk+(Use+KDE+Dialogs+in+Gtk+Apps)?content=36077
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:	KGtk-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM kde3-kgtk-0.10.1-gcc44.patch lazy.kent.suse@gmail.com
# -- fix build with GCC 4.4
Patch0:		kde3-kgtk-0.10.1-gcc44.patch
Patch1:         kgtk-trinity-1175922-typo-fix.dif
Group:		System/GUI/KDE
Summary:	Use KDE Dialogs in Gtk Apps
BuildRequires:	cmake kdelibs3-devel gtk2-devel
%if 0%{?suse_version} <= 1500 
BuildRequires:  gconf2-devel
%endif

%description
KGtk is a quick-and-dirty LD_PRELOAD hack that allows *some* Gtk applications
to use KDE's file dialogs when run under KDE.

Authors:
--------
    Craig Drummond <Craig.Drummond@lycos.co.uk>

%prep
%setup -q -n KGtk-%{version}
%patch0
%patch1 -p2
%ifarch x86_64
sed -i 's|lib/kgtk|lib64/kgtk|g' gtk2/kgtk2-wrapper.cmake
sed -i 's|lib/kgtk|lib64/kgtk|g' qt3/kqt3-wrapper.cmake
sed -i 's|lib/kgtk|lib64/kgtk|g' qt4/kqt4-wrapper.cmake
%endif

%build
export CXXFLAGS="$CXXFLAGS -Wl,--add-needed"
%{__mkdir} build
cd build
%ifarch x86_64 aarch64
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/opt/kde3 -DLIB_SUFFIX=64
%else
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/opt/kde3
%endif
%{__make} %{?jobs:-j%jobs}

%install
pushd build
%{makeinstall}
popd
%find_lang kdialogd3

%files -f kdialogd3.lang
%defattr(-,root,root)
%doc ChangeLog README AUTHORS TODO
%{_bindir}/*
%{_libdir}/kgtk

%changelog
openSUSE Build Service is sponsored by