LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File qt-creator.spec of Package qt-creator (Project openSUSE:Factory)

#
# spec file for package qt-creator
#
# 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/
#


Name:           qt-creator
Version:        2.5.82
Release:        0
Summary:        Lightweight IDE
License:        SUSE-LGPL-2.1-with-nokia-exception-1.1
Group:          Development/Tools/IDE
Url:            http://www.qtsoftware.com/developer/qt-creator/
%define rversion 2.6.0-beta
Source:         http://get.qt.nokia.com/qtcreator/%{name}-%{rversion}-src.tar.gz
Source1:        qtcreator.desktop
Patch1:         system-botan-lib.diff
Patch2:         hardcoded-runpath.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# depends on private headers and therefore needs the exact Qt version
%requires_eq    libqt4-x11
#########################################################################################
# SuSE, openSUSE
#########################################################################################
%if 0%{?suse_version}
BuildRequires:  fdupes
BuildRequires:  libQtWebKit-devel
BuildRequires:  libbotan-devel >= 1.10.2
BuildRequires:  libqt4-devel >= 4.7.4
BuildRequires:  libqt4-private-headers-devel
BuildRequires:  update-desktop-files
Recommends:     libQtWebKit-devel
Recommends:     libqt4-debuginfo
Recommends:     libqt4-devel-doc
%endif

#########################################################################################
# Fedora, RHEL or CentOS
#########################################################################################
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
BuildRequires:  desktop-file-utils
BuildRequires:  qt4-devel >= 4.7.4
%endif
Provides:       %{name}-devel = %{version}

%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 %{name}-%rversion-src
%if 0%{?suse_version}
%patch1 -p1
%endif
%patch2

%build
%if "%{_lib}"=="lib64"
qmake IDE_LIBRARY_BASENAME=lib64
%else
qmake
%endif
make %{?_smp_mflags}
make %{?_smp_mflags} docs
%if 0
cd share/qtcreator/gdbmacros
qmake
make
%endif

%install
export QTDIR=/usr/share/qt4
# its qmake. of course it is broken
make INSTALL_ROOT=%{buildroot}/%{_prefix} install
install -m 755 bin/qtcreator %{buildroot}%{_bindir}
install -m 755 bin/qmlpuppet %{buildroot}%{_bindir}
# copy doc to its (correct) destination:
install -d -m 755 %{buildroot}%{_docdir}/libqt4/qch/
cp share/doc/qtcreator/qtcreator.qch %{buildroot}%{_docdir}/libqt4/qch/
rm -rfv %{buildroot}%{_datadir}/doc/qtcreator
%if 0%{?suse_version}
  %suse_update_desktop_file -i qtcreator Development Qt IDE
%else
%if 0%{?fedora_version}
  desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ --add-category Development --add-category Qt --add-category IDE qtcreator.desktop
%endif
%endif
%fdupes %{buildroot}
%if 0
cd share/qtcreator/gdbmacros
make INSTALL_ROOT=%{buildroot}/%{_prefix} install
%endif

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc LICENSE.LGPL LGPL_EXCEPTION.TXT README
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/*
%dir %{_datadir}/icons/hicolor/*/apps
%dir %{_docdir}/libqt4/qch
%doc %{_docdir}/libqt4/qch/qtcreator.qch
%{_bindir}/qmlpuppet
%{_bindir}/qtcreator
%{_bindir}/qtcreator_process_stub
%{_bindir}/qtpromaker
%{_datadir}/applications/qtcreator.desktop
%{_datadir}/icons/hicolor/*/apps/qtcreator.png
%{_datadir}/qtcreator/
%{_libdir}/qtcreator/

%changelog