File libqt5-qttools.spec.in of Package libqt5-qtbase
#
# spec file for package libqt5-qttools
#
# Copyright (c) 2012 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/
#
%define _prefix /opt/qt-5.0
%define packageprefix opt-
Name: %{packageprefix}libqt5-qttools
BuildRequires: fdupes
# COMMON-VERSION-BEGIN
# COMMON-VERSION-END
BuildRequires: %{packageprefix}libQtWebKitWidgets-devel >= 5.0
BuildRequires: %{packageprefix}libQtQuick-private-headers-devel
BuildRequires: libxslt-devel
BuildRequires: update-desktop-files
BuildRequires: xz
Url: http://qt.digia.com
Summary: Qt 5 QtTools Module
License: SUSE-LGPL-2.1-with-nokia-exception-1.1 or GPL-3.0
Group: Development/Libraries/X11
# COMMON-BEGIN
# COMMON-END
%package devel
Summary: Qt Development Kit
Group: Development/Libraries/X11
Requires: %name = %version
Requires: libxslt-devel
Requires: %{packageprefix}libQtQuick-devel
Requires: %{packageprefix}libQtWebKitWidgets-devel >= 5.0
%description devel
You need this package, if you want to compile programs with qttools.
%package private-headers-devel
Summary: Non-ABI stable experimental API
Group: Development/Libraries/C and C++
Requires: %name-devel = %version
Requires: %{packageprefix}libQtQuick-private-headers-devel
%description private-headers-devel
This package provides private headers of libqt5-qttools that are normally
not used by application development and that do not have any ABI or
API guarantees. The packages that build against these have to require
the exact Qt version.
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%build
export QTDIR=`pwd`/qtbase
export PATH=$PATH:%{_prefix}/bin
cd qttools
%ifarch ppc64
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mminimal-toc"
%endif
export CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS -DOPENSSL_LOAD_CONF"
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -DOPENSSL_LOAD_CONF"
export MAKEFLAGS="%{?jobs:-j %jobs}"
qmake
make
%install
cd qttools
make INSTALL_ROOT=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT/%_libdir -type f -name '*la' -print -exec perl -pi -e 's, -L%{_builddir}/\S+,,g' {} \;
find $RPM_BUILD_ROOT/%_libdir -type f -name '*pc' -print -exec perl -pi -e "s, -L$RPM_BUILD_DIR/?\S+,,g" {} \; -exec sed -i -e "s,^moc_location=.*,moc_location=%_bindir/moc," -e "s,uic_location=.*,uic_location=%_bindir/uic," {} \;
%fdupes $RPM_BUILD_ROOT/%_includedir
pushd $RPM_BUILD_ROOT/%_bindir
%if 0
ln -s qt-5.0-env.sh qtconfig-wrapper
%endif
ln -s qt-5.0-env.sh assistant-wrapper
ln -s qt-5.0-env.sh designer-wrapper
ln -s qt-5.0-env.sh linguist-wrapper
popd
#
# install menu entries
#
%if 0
%suse_update_desktop_file -i %{packageprefix}qt5config Qt Utility DesktopSettings
%endif
%suse_update_desktop_file -i %{packageprefix}designer5 Qt Development GUIDesigner
%suse_update_desktop_file -i %{packageprefix}linguist5 Qt Development Translation
%suse_update_desktop_file -i %{packageprefix}assistant5 Qt Development Documentation
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,755)
%_bindir/assistant
%_bindir/assistant-wrapper
%_bindir/designer
%_bindir/designer-wrapper
%_bindir/linguist-wrapper
%if 0
%_bindir/bin/qtconfig-wrapper
%endif
%_bindir/lconvert
%_bindir/linguist
%_bindir/lrelease
%_bindir/lupdate
%_bindir/pixeltool
%_bindir/qcollectiongenerator
%_bindir/qdbus
%_bindir/qdbusviewer
%_bindir/qhelpconverter
%_bindir/qhelpgenerator
/usr/share/applications/%{packageprefix}assistant5.desktop
/usr/share/applications/%{packageprefix}designer5.desktop
/usr/share/applications/%{packageprefix}linguist5.desktop
#/usr/share/applications/%{packageprefix}qt5config.desktop
/usr/share/pixmaps/%{packageprefix}assistant.png
/usr/share/pixmaps/%{packageprefix}designer.png
/usr/share//pixmaps/%{packageprefix}linguist.png
%_libdir/libQt5CLucene.so.*
%_libdir/libQt5Designer.so.*
%_libdir/libQt5DesignerComponents.so.*
%_libdir/libQt5Help.so.*
%_libdir/qt5/plugins/designer
%files private-headers-devel
%defattr(-,root,root,755)
%_includedir/QtCLucene/%{version}
%_includedir/QtDesigner/%{version}
%_includedir/QtDesignerComponents/%{version}
%_includedir/QtHelp/%{version}
%_includedir/QtUiTools/%{version}
%files devel
%defattr(-,root,root,755)
%exclude %_includedir/QtCLucene/%{version}
%_includedir/QtCLucene
%exclude %_includedir/QtDesigner/%{version}
%_includedir/QtDesigner
%exclude %_includedir/QtDesignerComponents/%{version}
%_includedir/QtDesignerComponents
%exclude %_includedir/QtHelp/%{version}
%_includedir/QtHelp
%exclude %_includedir/QtUiTools/%{version}
%_includedir/QtUiTools
%_libdir/cmake/Qt5Designer
%_libdir/cmake/Qt5Help
%_libdir/cmake/Qt5LinguistTools
%_libdir/cmake/Qt5UiTools
%_libdir/libQt5CLucene.la
%_libdir/libQt5CLucene.prl
%_libdir/libQt5CLucene.so
%_libdir/libQt5Designer.la
%_libdir/libQt5Designer.prl
%_libdir/libQt5Designer.so
%_libdir/libQt5DesignerComponents.la
%_libdir/libQt5DesignerComponents.prl
%_libdir/libQt5DesignerComponents.so
%_libdir/libQt5Help.la
%_libdir/libQt5Help.prl
%_libdir/libQt5Help.so
%_libdir/libQt5UiTools.a
%_libdir/libQt5UiTools.la
%_libdir/libQt5UiTools.prl
%_libdir/pkgconfig/Qt5CLucene.pc
%_libdir/pkgconfig/Qt5Designer.pc
%_libdir/pkgconfig/Qt5DesignerComponents.pc
%_libdir/pkgconfig/Qt5Help.pc
%_libdir/pkgconfig/Qt5UiTools.pc
%_libdir/qt5/mkspecs/modules/qt_lib_clucene.pri
%_libdir/qt5/mkspecs/modules/qt_lib_designer.pri
%_libdir/qt5/mkspecs/modules/qt_lib_help.pri
%_libdir/qt5/mkspecs/modules/qt_lib_uitools.pri
%_libdir/qt5/mkspecs/modules/qt_lib_designercomponents.pri
%dir %_datadir
%dir %_datadir/qt5
%_datadir/qt5/phrasebooks
%changelog