File libqt5-creator.spec of Package libqt5-creator

#
# spec file for package libqt5-creator
#
# Copyright (c) 2013 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/
#


Name:           libqt5-creator
Version:        2.8.1
Release:        0
Summary:        Lightweight IDE
License:        SUSE-LGPL-2.1-with-digia-exception-1.1
Group:          Development/Tools/IDE
Url:            http://qt.digia.com/Product/Developer-Tools/
%define rversion 2.8.1
Source:         http://download.qt-project.org/official_releases/qtcreator/2.8/%{rversion}/qt-creator-%{rversion}-src.tar.gz
Source1:        %{name}-rpmlintrc
BuildRequires:  fdupes
BuildRequires:  gdb
BuildRequires:  libQt5Declarative-private-headers-devel
BuildRequires:  libQt5Quick-private-headers-devel
BuildRequires:  libQt5Script-devel
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  libqt5-qttools-devel
BuildRequires:  update-desktop-files
BuildRequires:  xz
BuildRequires:  pkgconfig(Qt5X11Extras)
Recommends:     libqt5-debuginfo
Recommends:     libqt5-qtdoc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Conflicts:      qt-creator

%description
Qt Creator is a new, lightweight, cross-platform integrated development
environment (IDE) designed to make development with the Qt application
framework even faster and easier.

%prep
%setup -q -n qt-creator-%rversion-src

%build
%if "%{_lib}"=="lib64"
%{_bindir}/qmake-qt5 IDE_LIBRARY_BASENAME=lib64
%else
%{_bindir}/qmake-qt5
%endif
rm src/shared/qbs/qbs.pro
make %{?_smp_mflags}
make qch_docs
make html_docs_online

%install
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}%{_libdir}"
# its qmake. of course it is broken
make INSTALL_ROOT=%{buildroot}/%{_prefix} install

mkdir -p %{buildroot}%{_datadir}/doc/packages/libqt5
cp share/doc/qtcreator/qtcreator.qch %{buildroot}%{_datadir}/doc/packages/libqt5/

mkdir -p %{buildroot}%{_datadir}/doc/packages/libqt5/qtcreator
cp -a doc/html/* %{buildroot}%{_datadir}/doc/packages/libqt5/qtcreator/

%suse_update_desktop_file -c qtcreator "Qt 5.0 Creator" "C++ IDE for developing Qt applications" qtcreator QtProject-qtcreator "Development Qt IDE"

%fdupes %{buildroot}/%{_prefix}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc LICENSE.LGPL LGPL_EXCEPTION.TXT
%{_bindir}/*
%{_libdir}/qtcreator/
%{_datadir}/qtcreator/
%{_datadir}/icons/hicolor
%{_datadir}/applications/qtcreator.desktop
%dir %{_datadir}/doc/packages/libqt5
%{_datadir}/doc/packages/libqt5/qtcreator.qch
%{_datadir}/doc/packages/libqt5/qtcreator

%changelog
openSUSE Build Service is sponsored by