# This package contains modified QT libraries. # so don't check rpath %define __arch_install_post /usr/lib/rpm/check-buildroot Summary: Customized version of the QT toolkit for generating PDFs using Web-kit Name: wkhtmltopdf-qt Version: 4.8.0 Release: 6.git20111107%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT Group: System Environment/Libraries Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Url: http://qt.gitorious.org/qt/wkhtmltopdf-qt # TODO work out how to pull the diff from git and apply a patch to the upstream release Source0: http://wkhtmltopdf.googlecode.com/files/%{name}-%{version}.tar.gz Patch0: s390x-javascript.patch Patch1: qt-everywhere-opensource-src-4.8.0-cve-2012-5624-qml-redirect.patch %define qtdir /%{_libdir}/wkhtmltopdf/ %if "%{_lib}" == "lib64" %define platform linux-g++-64 %else %define platform linux-g++ %endif BuildRequires: libtiff-devel BuildRequires: libmng-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: zlib-devel BuildRequires: perl BuildRequires: sed BuildRequires: findutils BuildRequires: desktop-file-utils BuildRequires: freetype-devel BuildRequires: fontconfig-devel BuildRequires: libICE-devel BuildRequires: libSM-devel BuildRequires: libXcursor-devel BuildRequires: libXext-devel BuildRequires: libXft-devel BuildRequires: libXi-devel BuildRequires: libXinerama-devel BuildRequires: libXrandr-devel BuildRequires: libXrender-devel BuildRequires: libXt-devel BuildRequires: libX11-devel BuildRequires: xorg-x11-proto-devel BuildRequires: mesa-libGL-devel BuildRequires: mesa-libGLU-devel BuildRequires: openssl-devel # Announce bundling Provides: bundled(libQtCore) Provides: bundled(libQtDeclarative) Provides: bundled(libQtGui) Provides: bundled(libQtNetwork) Provides: bundled(libQtScript) Provides: bundled(libQtSql) Provides: bundled(libQtSvg) Provides: bundled(libQtTest) Provides: bundled(libQtWebKit) Provides: bundled(libQtXml) Provides: bundled(libQtXmlPatterns) Provides: bundled(libqcncodecs) Provides: bundled(libqgenericbearer) Provides: bundled(libqgif) Provides: bundled(libqico) Provides: bundled(libqimsw-multi) Provides: bundled(libqjpcodecs) Provides: bundled(libqjpeg) Provides: bundled(libqkrcodecs) Provides: bundled(libqmldbg_tcp) Provides: bundled(libqmlfolderlistmodelplugin) Provides: bundled(libqmlgesturesplugin) Provides: bundled(libqmlparticlesplugin) Provides: bundled(libqmlwebkitplugin) Provides: bundled(libqmng) Provides: bundled(libqsvg) Provides: bundled(libqsvgicon) Provides: bundled(libqtiff) Provides: bundled(libqtracegraphicssystem) Provides: bundled(libqtwcodecs) # bundles do not provide any QT libraries %{?filter_setup: %filter_from_provides /.*\.so.*/d %filter_from_provides /pkgconfig.*/d %filter_from_requires /libQt.*.so.*/d %filter_from_requires /pkgconfig.*/d %filter_setup } %description Qt is a GUI software toolkit which simplifies the task of writing and maintaining GUI (Graphical User Interface) applications for the X Window System. Qt is written in C++ and is fully object-oriented. This package contains a customized version of QT used by wkhtmltopdf for generating PDF documents using the WebKit engine. %package devel Summary: Development files for the %{name} toolkit Group: Development/Libraries Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description devel This package contains the files necessary to develop applications using the %{name} toolkit. %prep %setup -q %patch0 -p 1 %patch1 -p 1 %ifarch s390x perl -pi -e "s|-m64|-m64 %{optflags}|g" mkspecs/%{platform}/qmake.conf %endif # set correct FLAGS #perl -pi -e "s|-O2|%{optflags}|g" mkspecs/%{platform}/qmake.conf %ifarch ppc64 perl -pi -e "s|-m64|-mminimal-toc -fno-optimize-sibling-calls -m64 %{optflags}|g" mkspecs/%{platform}/qmake.conf %endif %ifarch ppc perl -pi -e "s|sublib|sublib\n\nQMAKE_CFLAGS = -mminimal-toc -fno-optimize-sibling-calls\nQMAKE_LFLAGS = -mminimal-toc -fno-optimize-sibling-calls|g" mkspecs/%{platform}/qmake.conf %endif %build # Build shared libraries # since we don't use ldconfig (it breakes any other QT app) we need to use rpath. ./configure \ -opensource \ -confirm-license \ -prefix %{qtdir} \ --libdir=%{qtdir} \ -shared \ -fast \ -no-accessibility \ -no-stl \ -no-sql-ibase \ -no-sql-mysql \ -no-sql-odbc \ -no-sql-psql \ -no-sql-sqlite \ -no-sql-sqlite2 \ -no-qt3support \ -no-phonon \ -no-phonon-backend \ -webkit-debug \ -no-scripttools \ -system-zlib \ -system-libtiff \ -system-libpng \ -system-libmng \ -system-libjpeg \ -graphicssystem raster \ -nomake tools \ -nomake examples \ -nomake demos \ -nomake docs \ -nomake translations \ -no-opengl \ -no-dbus \ -no-multimedia \ -exceptions \ -xmlpatterns \ -no-mmx \ -no-3dnow \ -no-sse \ -no-sse2 \ -no-sse3 \ -no-ssse3 \ -no-sse4.1 \ -no-sse4.2 \ -no-avx \ -no-neon \ -no-pch \ -openssl \ -rpath \ -debug #-release \ make %{?_smp_mflags} %install rm -rf %{buildroot} make install INSTALL_ROOT=%{buildroot} # remove .la files rm -f %{buildroot}%{qtdir}/*.la find %{buildroot}%{qtdir}/mkspecs -type f | xargs chmod 644 %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc LGPL_EXCEPTION.txt LICENSE.LGPL %{qtdir}/ %exclude %{qtdir}/include %exclude %{qtdir}/mkspecs %exclude %{qtdir}/pkgconfig/*.pc %exclude %{qtdir}/*.so %exclude %{qtdir}/*.prl %files devel %defattr(-,root,root,-) %{qtdir}/include %{qtdir}/mkspecs %{qtdir}/pkgconfig/*.pc %{qtdir}/*.so %{qtdir}/*.prl %changelog * Mon Jan 21 2013 Jeff Fearn 4.8.0-6.git20111107 - Fix bundling. * Thu Dec 07 2012 Jeff Fearn 4.8.0-5.git20111107 - Fix RPMDiff multilib errors. * Wed Dec 06 2012 Jeff Fearn 4.8.0-4.git20111107 - Fix QML redirect vulnerability. BZ #883467 * Mon Dec 04 2012 Jeff Fearn 4.8.0-3.git20111107 - Fix rpmlint warnings. * Wed Nov 09 2011 Jeff Fearn 4.8.0-2.git20111107 - Tweak PPC opts to stop segfault * Mon Nov 07 2011 Jeff Fearn 4.8.0-1.git20111107 - Upstream bump * Fri Nov 4 2011 Jeff Fearn 4.7.1-2.git20110804 - get some debuginfo! * Tue Aug 23 2011 Jeff Fearn 4.7.1-1.git20110804 - Pull from git head. * Fri Aug 20 2010 Jethro Carr 4.6.3-git2010820-1 - Upgraded to QT 4.6.3 - Added further customisations from wkhtmltopdf project to support release 0.9.9 of wkhtmltopdf * Wed Aug 11 2010 Jethro Carr 4.6.2-git20100325-2 - Fixed ld.conf.d file installation * Fri Mar 26 2010 Jethro Carr 4.6.2-git20100325-1 - Created custom package for wkhtmltopdf customised version of wkhtmltopdf based on SPEC written by RedHat for RHEL 5