File libqt5-qtdoc.spec.in of Package libqt5-qtbase

#
# spec file for package libqt5-qtdoc
#
# 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/
#
# nodebuginfo

%define _prefix /opt/qt-5.0
%define packageprefix opt-

Name:           %{packageprefix}libqt5-qtdoc
# COMMON-VERSION-BEGIN
# COMMON-VERSION-END
BuildRequires:  %{packageprefix}libqt5-qtbase-devel
BuildRequires:  %{packageprefix}libqt5-qttools
BuildRequires:  fdupes
BuildRequires:  xz
Url:            http://qt.digia.com
Summary:        Qt 5 Doc
License:        SUSE-LGPL-2.1-with-nokia-exception-1.1 or GPL-3.0
Group:          Documentation/HTML
BuildArch:      noarch
# COMMON-BEGIN
# COMMON-END

%build
export QTDIR=`pwd`/qtbase
export PATH=$PATH:%{_prefix}/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_libdir}
export QT_INSTALL_DOCS=`pwd`/qtbase/doc

cd $QTDIR/../qtdoc
qdoc `pwd`/doc/config/qtdoc.qdocconf -outputdir html

qmake
make docs

%install
cd qtdoc
make INSTALL_ROOT=$RPM_BUILD_ROOT install

mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/opt-libqt5
cp -a $RPM_BUILD_DIR/*/qtdoc/doc/qtdoc $RPM_BUILD_ROOT/usr/share/doc/packages/%{packageprefix}libqt5/
cp -a $RPM_BUILD_DIR/*/qtdoc/doc/qtdoc.qch $RPM_BUILD_ROOT/usr/share/doc/packages/%{packageprefix}libqt5/

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,755)
/usr/share/doc/packages/%{packageprefix}libqt5

%changelog
openSUSE Build Service is sponsored by