File libqt4-devel-doc.spec of Package libqt4
#
# spec file for package libqt4-devel-doc
#
# 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
# nodebuginfo
%define _prefix /opt/qt-4.8
%define packageprefix opt-
Name: %{packageprefix}libqt4-devel-doc
BuildRequires: cups-devel freeglut-devel libjpeg-devel libpng-devel
BuildRequires: alsa-devel gtk2-devel %{packageprefix}libQtWebKit-devel %{packageprefix}libqt4-devel sqlite3-devel
%if 0%{?suse_version} > 1020
BuildRequires: fdupes
%endif
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
BuildRequires: -post-build-checks
# COMMON-VERSION-BEGIN
# COMMON-VERSION-BEGIN
Version: 4.8.4
Release: 1
%define base_name opt-libqt4
%define x11_free -everywhere-opensource-src-
%define rversion 4.8.4
# COMMON-VERSION-END
# COMMON-VERSION-END
Url: http://qt.digia.com
License: QPL, GPL
Group: Documentation/HTML
Summary: Qt documentation
Requires: %{packageprefix}libqt4 = %version
Requires: %{packageprefix}libqt4-devel-doc-data = %version
Requires: %{packageprefix}libqt4-sql-sqlite >= %version
Provides: %{packageprefix}libqt4-examples = 4.4.0
Obsoletes: %{packageprefix}libqt4-examples <= 4.4.0
Provides: %{packageprefix}qt-devel-doc = 4.4.0
Obsoletes: %{packageprefix}qt-devel-doc <= 4.4.0
# COMMON-BEGIN
# COMMON-BEGIN
Source: qt%x11_free%rversion.tar.bz2
# to get mtime of file:
Source1: libqt4.changes
Source2: baselibs.conf
Source10: qt4config.desktop
Source11: designer4.desktop
Source12: linguist4.desktop
Source13: assistant4.desktop
Source14: assistant.png
Source15: designer.png
Source16: linguist.png
Source17: qt-4.8-env.sh
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
Patch41: konsole-nvidia-font-speed.diff
Patch43: 0195-compositing-properties.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
Patch101: no-moc-date.diff
Patch102: 0253-qmake_correct_path_separators.diff
Patch107: webkit-ia64_s390x.patch
Patch109: libqt4-libtool-nodate.diff
Patch113: ppc64-webkit-link-fix.diff
Patch118: rcc-stable-dirlisting.diff
Patch119: hppa_ldcw_fix.diff
Patch120: hppa_unaligned_access_fix_458133.diff
Patch121: webkit-sparc64.diff
Patch123: use-cups-default-print-settings-bnc552218.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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 -prefix %_prefix -L %_libdir -libdir %_libdir -docdir %_docdir/%{base_name} -examplesdir %_libdir/qt4/examples -demosdir %_libdir/qt4/demos -plugindir %plugindir -translationdir %_datadir/qt4/translations -iconv -sysconfdir /etc/settings -datadir %_datadir/qt4/ -no-pch -reduce-relocations -exceptions -system-libtiff -glib -optimized-qmake -no-webkit -no-xmlpatterns -system-sqlite -qt3support -no-sql-mysql -importdir %plugindir/imports -xsync -xinput -gtkstyle
%define check_config \
grep '# define' src/corelib/global/qconfig.h | egrep -v 'QT_(ARCH|USE)'; \
if test -f %_datadir/qt4/mkspecs/qconfig.pri ; then \
cmp %_datadir/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
%patch41
%patch43
# ### 47 rediff
# %patch60
# bnc#374073 comment #8
# %patch61
%patch70
%patch75
%patch87
%patch101
# ### 47 rediff
# %patch102
# ### 47 rediff
# %patch107
%patch109
#%patch113
%patch118 -p1
%ifarch hppa
%patch119
%patch120
%endif
%patch123
# ### 47 rediff
#%patch121 -p1
# be sure not to use them
rm -rf src/3rdparty/{libjpeg,freetype,libpng,zlib,libtiff,fonts}
# COMMON-END
# COMMON-END
%package -n %{packageprefix}qt4-x11-tools
License: QPL, GPL
Group: System/Libraries
Summary: C++ Program Library, Core Components
Requires: %{packageprefix}libqt4-x11 >= %version
%description -n %{packageprefix}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
%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/:%_libdir
export CXXFLAGS="$RPM_OPT_FLAGS"
export CFLAGS="$RPM_OPT_FLAGS"
export MAKEFLAGS="%{?_smp_mflags}"
%ifarch sparc64
platform="-platform linux-g++-64"
%else
platform=""
%endif
echo yes | ./configure %common_options $platform \
-webkit -xmlpatterns -no-sql-sqlite -no-sql-sqlite2 -no-sql-mysql
%check_config
%if 0
make %{?_smp_mflags} sub-src
%else # simply use the binaries from the -devel package instead of building it again
rpm -ql %{packageprefix}libqt4-devel | grep %{_bindir}/ | sed 's#%{_bindir}/##' | \
( while read file; do test -e bin/$file || ln -s %{_bindir}/$file bin/ ; done )
rpm -ql %{packageprefix}libqt4-devel | grep %{_libdir}/lib | sed 's#%{_libdir}/##' | \
( while read file; do test -e lib/$file || ln -s %{_libdir}/$file lib/ ; done )
rpm -ql %{packageprefix}libQtWebKit-devel | grep %{_bindir}/ | sed 's#%{_bindir}/##' | \
( while read file; do test -e bin/$file || ln -s %{_bindir}/$file bin/ ; done )
rpm -ql %{packageprefix}libQtWebKit-devel | grep %{_libdir}/lib | sed 's#%{_libdir}/##' | \
( while read file; do test -e lib/$file || ln -s %{_libdir}/$file lib/ ; done )
%endif
make %{?_smp_mflags} -C tools/assistant
make %{?_smp_mflags} -C demos
make %{?_smp_mflags} -C examples
%install
export QTDIR=$PWD
make INSTALL_ROOT=$RPM_BUILD_ROOT -C tools/assistant 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 %{packageprefix}libqt4-devel) $(rpm -ql %{packageprefix}libqt4-x11) $(rpm -ql %{packageprefix}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%_prefix/src/packages/BUILD/\S+,,g' {} \;
find $RPM_BUILD_ROOT/%_libdir/pkgconfig -type f -name '*pc' -print -exec perl -pi -e 's, -L%_prefix/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
%if %suse_version > 1020
%fdupes $RPM_BUILD_ROOT/%_prefix/include
%fdupes $RPM_BUILD_ROOT/%_libdir/qt4/examples
%fdupes $RPM_BUILD_ROOT/%_libdir/qt4/demos
%endif
# remove some executable flags from source files:
chmod ugo-x %{buildroot}/%_libdir/qt4/examples/tutorials/modelview/*/*.h
chmod ugo-x %{buildroot}/%_libdir/qt4/examples/tutorials/modelview/*/*.cpp
pushd $RPM_BUILD_ROOT/%_bindir
ln -s qt-4.8-env.sh assistant-wrapper
popd
%suse_update_desktop_file -i assistant4 Qt Development Documentation
mv $RPM_BUILD_ROOT/usr/share/applications/assistant4.desktop $RPM_BUILD_ROOT/usr/share/applications/assistant48.desktop
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/
cp %{SOURCE14} $RPM_BUILD_ROOT/usr/share/pixmaps/
mv $RPM_BUILD_ROOT/usr/share/pixmaps/assistant.png $RPM_BUILD_ROOT/usr/share/pixmaps/assistant48.png
%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
%files
%defattr(-,root,root,755)
%_bindir/assistant*
%_bindir/qcollectiongenerator
%_bindir/qtdemo
/usr/share/applications/assistant48.desktop
/usr/share/pixmaps/assistant48.png
#%_datadir/qt4/translations/assistant_*.qm
%_libdir/qt4/demos
%dir %_docdir/%base_name
%_docdir/%base_name/demos
%_docdir/%base_name/examples
%_libdir/qt4/examples
%files -n %{packageprefix}qt4-x11-tools
%defattr(-,root,root,755)
%_bindir/svgviewer
%_bindir/qt4-browser
%changelog