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

#
# spec file for package libqt5-qtquick1
#
# 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}libQtDeclarative5
BuildRequires:  fdupes
# COMMON-VERSION-BEGIN
# COMMON-VERSION-END
BuildRequires:  %{packageprefix}libQtXmlPatterns-devel
BuildRequires:  %{packageprefix}libQtSvg-devel
BuildRequires:  %{packageprefix}libQtScript-private-headers-devel
BuildRequires:  xz
Url:            http://qt.digia.com
Summary:        Qt 5 Declarative Library
License:        SUSE-LGPL-2.1-with-nokia-exception-1.1 or GPL-3.0
Group:          Development/Libraries/X11
Provides:       %{packageprefix}libQtQuick1-5 = 4.99.0+4.5.0.beta2
Obsoletes:      %{packageprefix}libQtQuick1-5 < 4.99.0+4.5.0.beta2
Recommends:     %{packageprefix}libqt5-qtgraphicaleffects = %version
# COMMON-BEGIN
# COMMON-END

%package -n %{packageprefix}libQtDeclarative-devel
Summary:        Qt Development Kit
Group:          Development/Libraries/X11
Requires:       %name = %version
Requires:       %{packageprefix}libQtXmlPatterns-devel
Requires:       %{packageprefix}libQtScript-devel
Requires:       %{packageprefix}libQtSvg-devel
Provides:       %{packageprefix}libQtQuick1-devel = 4.99.0+4.5.0.beta2
Obsoletes:      %{packageprefix}libQtQuick1-devel < 4.99.0+4.5.0.beta2

%description -n %{packageprefix}libQtDeclarative-devel
You need this package, if you want to compile programs with qtdeclarative.

%package -n %{packageprefix}libQtDeclarative-private-headers-devel
Summary:        Non-ABI stable experimental API
Group:          Development/Libraries/C and C++
Requires:       %{packageprefix}libQtDeclarative-devel = %version
Requires:       %{packageprefix}libQtScript-private-headers-devel
Provides:       %{packageprefix}libQtQuick1-private-headers-devel = 4.99.0+4.5.0.beta2
Obsoletes:      %{packageprefix}libQtQuick1-private-headers-devel < 4.99.0+4.5.0.beta2

%description -n %{packageprefix}libQtDeclarative-private-headers-devel
This package provides private headers of libqt5-qtdeclarative 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 qtquick1
%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 qtquick1
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' {} \;
%fdupes %{buildroot}/%_includedir

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,755)
%_bindir/qmlviewer
%_bindir/qml1plugindump
%_libdir/libQt5Declarative.so.*
%dir %_libdir/qt5/plugins/imports
%dir %_libdir/qt5/plugins/imports/Qt
%dir %_libdir/qt5/plugins/imports/Qt/labs
%_libdir/qt5/plugins/imports/Qt/labs/gestures
%_libdir/qt5/plugins/imports/Qt/labs/particles
%_libdir/qt5/plugins/imports/Qt/labs/shaders
%_libdir/qt5/plugins/imports/Qt/labs/folderlistmodel
%_libdir/qt5/plugins/imports/builtins.qmltypes
%_libdir/qt5/plugins/qmltooling

%files -n %{packageprefix}libQtDeclarative-private-headers-devel
%defattr(-,root,root,755)
%_includedir/QtDeclarative/%{version}

%files -n %{packageprefix}libQtDeclarative-devel
%defattr(-,root,root,755)
%exclude %_includedir/QtDeclarative/%{version}
%_includedir/QtDeclarative
%_libdir/cmake/Qt5Declarative
%_libdir/libQt5Declarative.la
%_libdir/libQt5Declarative.prl
%_libdir/libQt5Declarative.so
%_libdir/pkgconfig/Qt5Declarative.pc
%_libdir/qt5/mkspecs/modules/qt_lib_declarative.pri

%changelog
openSUSE Build Service is sponsored by