File libQtWebKit-devel.spec of Package libqt4

#
# spec file for package libQtWebKit-devel (Version 4.5.3)
#
# Copyright (c) 2009 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
# nodebuginfo


Name:           libQtWebKit-devel
BuildRequires:  cups-devel freeglut-devel libjpeg-devel libpng-devel
BuildRequires:  libqt4-devel
%if 0%{?suse_version} > 1020
BuildRequires:  fdupes
%endif
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
Url:            http://www.trolltech.com
License:        QPL, GPL
Group:          System/Libraries
AutoReqProv:    on
Summary:        Qt 4 SQL related libraries
Requires:       libQtWebKit4 = %(rpm -q --queryformat '%{VERSION}' libqt4-x11)
%requires_eq    libqt4-devel
# COMMON-BEGIN
# COMMON-BEGIN
Version:        4.5.3
Release:        3.<RELEASE5>
%define base_name libqt4
%define x11_free  -x11-opensource-src-
%define rversion 4.5.3
Source:         qt%x11_free%rversion.tar.bz2
Source10:       qt4config.desktop
Source11:       designer4.desktop
Source12:       linguist4.desktop
Source13:       assistant4.desktop
Source14:       assistant.png
Source15:       designer.png
Source16:       linguist.png
Patch2:         qt-never-strip.diff
Patch3:         plastik-default.diff
Patch6:         use-freetype-default.diff
Patch1006:      use-freetype-default-legacy.diff
Patch8:         link-tools-shared.diff
Patch39:        0191-listview-alternate-row-colors.diff
Patch40:        0188-fix-moc-parser-same-name-header.diff
Patch43:        0195-compositing-properties.diff
Patch55:        ignore-global-advance-width-in-fots.diff
Patch60:        0180-window-role.diff
Patch61:        qt4-fake-bold.patch
Patch70:        0225-invalidate-tabbar-geometry-on-refresh.patch
Patch75:        qt-debug-timer.diff
Patch87:        qfatal-noreturn.diff
Patch90:        display-key-support.diff
Patch101:       no-moc-date.diff
Patch102:       0253-qmake_correct_path_separators.diff
Patch105:       disable-callgrind.diff
Patch106:       build-install-qdoc3.diff
Patch108:       0280-deserialization-custom-dbus-properties.diff
Patch111:       0283-do-not-deduce-scrollbar-extent-twice.diff
Patch113:       0019-Make-QMenu-respect-the-minimum-width-set.patch
Patch114:       avoid-dbus-deadlock.diff
Patch116:       fix-xsync-flag.diff
Patch117:       glib-eventloop-regression.diff
Patch118:       filter-leak-fix.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %suse_version > 910
  %define common_options --opensource -fast -no-separate-debug-info -shared -xkb -xrender -xcursor -dbus-linked -xfixes -xrandr -xinerama -sm -no-nas-sound -no-rpath -system-libjpeg -system-libpng -accessibility -cups -stl -nis -system-zlib -qt-gif -prefix /usr -L %_libdir -libdir %_libdir -docdir %_docdir/%{base_name} -examplesdir %_libdir/qt4/examples -demosdir %_libdir/qt4/demos -plugindir %plugindir -translationdir /usr/share/qt4/translations -iconv -sysconfdir /etc/settings -datadir /usr/share/qt4/ -no-pch -reduce-relocations -exceptions -system-libtiff -glib -optimized-qmake -no-webkit -no-xmlpatterns -system-sqlite -qt3support -xsync
%else
  %define common_options --opensource -fast -no-separate-debug-info -shared -xkb -no-xrender -no-xrandr -no-xinerama -no-xshape -no-nas-sound -no-rpath -system-libjpeg -system-libpng -accessibility -cups -stl -nis -system-zlib -qt-gif -prefix /usr -L %_libdir -libdir %_libdir -docdir %_docdir/%{base_name} -examplesdir %_libdir/qt4/examples -demosdir %_libdir/qt4/demos -plugindir %plugindir -translationdir /usr/share/qt4/translations -iconv -sysconfdir /etc/settings -datadir /usr/share/qt4/ -no-pch -no-exceptions -system-libtiff -no-sm -no-opengl -no-xcursor -no-webkit -no-xmlpatterns
%endif
%define check_config \
  grep '# define' src/corelib/global/qconfig.h | egrep -v 'QT_(ARCH|USE)';             \
  if test -f /usr/share/qt4/mkspecs/qconfig.pri ; then                                 \
    cmp /usr/share/qt4/mkspecs/qconfig.pri mkspecs/qconfig.pri || exit 1;           \
  fi                                                                                   \

%description
Qt is a set of libraries for developing applications.

This package contains base tools, like string, xml, and network
handling.



Authors:
--------
    Qt Software

%prep
%define plugindir %_libdir/qt4/plugins
%setup -q -n qt%x11_free%rversion
%patch2
%patch3
%if %suse_version > 1010
%patch6
%else
%patch1006
%endif
# needs rediffing
#%patch8
%patch39
%patch40
%patch43
%patch55
%patch60
%if %suse_version > 910
# bnc#374073 comment #8
# %patch61
%endif
%patch70
%patch75
%patch87
%patch90
%patch101
%patch102
%patch105
%patch106
%patch108
%patch111
%patch113 -p1
%patch114 -p1
%patch116
%patch117 -p1
%patch118
# be sure not to use them
rm -rf src/3rdparty/{libjpeg,freetype,libpng,zlib,libtiff}
# COMMON-END
# COMMON-END

%package -n libQtWebKit4
License:        QPL, GPL
Group:          Development/Libraries/C and C++
Summary:        Qt 4 sqlite plugin
Requires:       libqt4-x11 = %version

%description -n libQtWebKit4
Qt 4 sqlite plugin to be able to use database functionality with Qt
applications without the need to setup a SQL server.



Authors:
--------
    Troll Tech AS, Norway

%package -n qt4-x11-tools
License:        QPL, GPL
Group:          System/Libraries
Summary:        C++ Program Library, Core Components
Requires:       libqt4-x11 >= %version

%description -n qt4-x11-tools
Qt is a set of libraries for developing applications.

This package contains base tools, like string, xml, and network
handling.



Authors:
--------
    Troll Tech AS, Norway


%package -n libqt4-devel-doc
License:        QPL, GPL
Group:          Documentation/HTML
Summary:        Qt documentation
Obsoletes:      qt-devel-doc
Provides:       qt-devel-doc
Requires:       %base_name = %version
Requires:       %base_name-devel-doc-data = %version
Requires:       %base_name-sql-sqlite >= %version

%description -n libqt4-devel-doc
The package contains documentation and examples to develop Qt
applications. The SuSE help provides a search function for this
documentation. The package includes also a tutorial and examples.



Authors:
--------
    Troll Tech AS, Norway

%build
%ifarch ppc64
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mminimal-toc"
%endif
export QTDIR=$PWD
export PATH=$PWD/bin:$PATH
export LD_LIBRARY_PATH=$PWD/lib/
sed -i -e "/^QMAKE_CFLAGS_RELEASE[ \t]*+=/s,\$, $RPM_OPT_FLAGS," mkspecs/common/g++.conf
export MAKEFLAGS="%{?jobs:-j %jobs}"
echo yes | ./configure %common_options -webkit -xmlpatterns -no-sql-sqlite -no-sql-sqlite2 -no-sql-mysql
%check_config
make %{?jobs:-j%jobs} sub-src
make %{?jobs:-j%jobs} -C tools/assistant
make %{?jobs:-j%jobs} -C src/3rdparty/webkit/WebCore
make %{?jobs:-j%jobs} -C src/xmlpatterns
make %{?jobs:-j%jobs} -C demos
make %{?jobs:-j%jobs} -C examples

%install
export QTDIR=$PWD
make INSTALL_ROOT=$RPM_BUILD_ROOT -C tools/assistant install
make INSTALL_ROOT=$RPM_BUILD_ROOT -C src/3rdparty/webkit/WebCore install
make INSTALL_ROOT=$RPM_BUILD_ROOT -C src/xmlpatterns install
make INSTALL_ROOT=$RPM_BUILD_ROOT -C demos install
make INSTALL_ROOT=$RPM_BUILD_ROOT -C examples install
mv $RPM_BUILD_ROOT/%_libdir/qt4/examples/painting/svgviewer/svgviewer $RPM_BUILD_ROOT/%_bindir
mv $RPM_BUILD_ROOT/%_libdir/qt4/demos/browser/browser $RPM_BUILD_ROOT/%_bindir/qt4-browser
ln -s %_bindir/svgviewer $RPM_BUILD_ROOT/%_libdir/qt4/examples/painting/svgviewer/svgviewer
ln -s %_bindir/qt4-browser $RPM_BUILD_ROOT/%_libdir/qt4/demos/browser/browser
# reduce fileconflicts
for f in $(rpm -ql libqt4-devel) $(rpm -ql libqt4-x11) $(rpm -ql libqt4); do
  test -f $RPM_BUILD_ROOT/$f && rm $RPM_BUILD_ROOT/$f
done
find $RPM_BUILD_ROOT -type d -print0 | xargs -0 --no-run-if-empty rmdir --ignore-fail-on-non-empty
# argggh, qmake is such a piece of <censored>
mkdir -p $RPM_BUILD_ROOT/%_libdir/pkgconfig
find  $RPM_BUILD_ROOT/%_libdir -type f -name '*.pc' -exec mv {} $RPM_BUILD_ROOT/%_libdir/pkgconfig \;
# fix more qmake errors
mkdir -p $RPM_BUILD_ROOT/%_libdir/qt
find $RPM_BUILD_ROOT/%_libdir -type f -name '*la' -print -exec perl -pi -e 's, -L/usr/src/packages/BUILD/\S+,,g' {} \;
find $RPM_BUILD_ROOT/%_libdir/pkgconfig -type f -name '*pc' -print -exec perl -pi -e 's, -L/usr/src/packages/BUILD/\S+,,g' {} \;
mkdir -p $RPM_BUILD_ROOT/%_docdir/%base_name/
ln -s %_libdir/qt4/demos $RPM_BUILD_ROOT/%_docdir/%base_name/demos
ln -s %_libdir/qt4/examples $RPM_BUILD_ROOT/%_docdir/%base_name/examples
# packaged in %name-devel-doc-data
rm -rf $RPM_BUILD_ROOT/%_docdir/%base_name/{doc,html}
rm -f $RPM_BUILD_ROOT/%_libdir/libQt{3,A,C,G,H,N,S,T}*
rm -f $RPM_BUILD_ROOT/%_libdir/libQtXml.*
rm -rf $RPM_BUILD_ROOT/%_libdir/qt4/plugins
rm -rf $RPM_BUILD_ROOT/usr/share/qt4/translations
%if %suse_version > 1020
%fdupes $RPM_BUILD_ROOT/usr/include
%endif
%suse_update_desktop_file -i assistant4 Qt Development Documentation

%clean
rm -rf $RPM_BUILD_ROOT
# no baselibs supplements for older distros
%if %suse_version < 1110
  sed -i -e 's, supplements .*,,' $RPM_SOURCE_DIR/baselibs.conf
%endif
%if %suse_version > 910

%post -n libQtWebKit4 -p /sbin/ldconfig

%postun -n libQtWebKit4 -p /sbin/ldconfig
%endif
%if %suse_version > 910

%files -n libQtWebKit4
%defattr(-,root,root,755)
%_libdir/libQtWebKit.so.*
%_libdir/libQtXmlPatterns.so.*
%endif

%files
%defattr(-,root,root,755)
/usr/include/Qt/*
/usr/include/QtWebKit
/usr/include/QtXmlPatterns
%_libdir/libQtXmlPatterns.so
%_libdir/libQtXmlPatterns.prl
%_libdir/libQtXmlPatterns.la
%_libdir/libQtWebKit.so
%_libdir/libQtWebKit.prl
%_libdir/libQtWebKit.la
%_libdir/pkgconfig/QtWebKit.pc
%_libdir/pkgconfig/QtXmlPatterns.pc

%files -n libqt4-devel-doc
%defattr(-,root,root,755)
/usr/bin/assistant
/usr/bin/assistant_adp
/usr/bin/qhelpgenerator
/usr/bin/qhelpconverter
/usr/bin/qcollectiongenerator
/usr/bin/qtdemo
%if %suse_version > 910
/usr/share/pixmaps/assistant.png
%endif
/usr/share/applications/assistant4.desktop
/usr/%_lib/qt4/demos
%dir %_docdir/%base_name
%_docdir/%base_name/demos
%_docdir/%base_name/examples
%_libdir/qt4/examples

%files -n qt4-x11-tools
%defattr(-,root,root,755)
/usr/bin/svgviewer
/usr/bin/qt4-browser

%changelog
openSUSE Build Service is sponsored by