michael@214: ## michael@214: ## qtcreator.spec -- OpenPKG RPM Specification michael@344: ## Copyright (c) 2011 Michael Schloh von Bennewitz michael@214: ## michael@214: ## Permission to use, copy, modify, and distribute this software for michael@214: ## any purpose with or without fee is hereby granted, provided that michael@214: ## the above copyright notice and this permission notice appear in all michael@214: ## copies. michael@214: ## michael@214: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@214: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@214: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@214: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@214: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@214: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@214: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@214: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@214: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@214: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@214: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@214: ## SUCH DAMAGE. michael@214: ## michael@214: michael@214: # package information michael@214: Name: qtcreator michael@214: Summary: Cross Platform Application Framework michael@344: URL: http://qt.nokia.com/developer/qt-creator michael@214: Vendor: Nokia Corporation michael@214: Packager: Michael Schloh von Bennewitz michael@214: Distribution: MSvB Recherche Production michael@214: Class: EVAL michael@214: Group: Development michael@214: License: GPL michael@344: Version: 2.2.0 michael@344: Release: 20110514 michael@214: michael@214: # list of sources michael@344: Source0: ftp://ftp.qt.nokia.com/qtcreator/qt-creator-%{version}-src.tar.gz michael@214: michael@214: # build information michael@214: Prefix: %{l_prefix} michael@214: BuildRoot: %{l_buildroot} michael@344: BuildPreReq: OpenPKG, openpkg >= 20060823 michael@344: PreReq: OpenPKG, openpkg >= 20060823 michael@281: BuildPreReq: qt, qt::with_shared = yes michael@281: PreReq: qt, qt::with_shared = yes michael@214: AutoReq: no michael@214: AutoReqProv: no michael@214: michael@214: %description michael@214: Qt Creator is a cross platform integrated development environment michael@214: (IDE) with an advanced C++ code editor, integrated GUI layout and michael@214: forms designer, project and build management tools, integrated michael@214: context sensitive help system, visual debugger, and rapid code michael@214: navigation tools. Its portable design and leverage of the Qt SDK michael@214: allows for support of multiple platforms. michael@214: michael@214: %track michael@214: prog qtcreator = { michael@214: version = %{version} michael@261: url = ftp://ftp.qt.nokia.com/qtcreator/ michael@261: regex = qt-creator-(__VER__)-src\.tgz michael@214: } michael@214: michael@214: %prep michael@214: %setup -q -n qt-creator-%{version}-src michael@214: %{l_shtool} subst \ michael@261: -e 's;\(QMAKE_RPATHDIR +=\);#\1;g' \ michael@261: -e 's;\(\$\$join(QMAKE_RPATHDIR, ":"\));\1, "%{l_prefix}/lib/qtcreator:");' \ michael@261: src/rpath.pri michael@344: # Trolltech Bug: michael@344: # Hardcoded paths not correct in every case michael@219: %{l_shtool} subst \ michael@261: -e 's;\(share\)/\(doc\)/\(qtcreator\);\1/\3/\2;' \ michael@261: doc/doc.pri \ michael@261: qtcreator.pri \ michael@261: src/plugins/help/helpplugin.cpp michael@344: # Trolltech Bug: michael@344: # Redefined (simply copied from) Qt library source code michael@344: %{l_shtool} subst \ michael@344: -e 's;\(qt_clean_filter_list\);l_\1;g' \ michael@344: -e 's;\(qt_file_dialog_filter_reg_exp\);l_\1;g' \ michael@344: src/plugins/qt4projectmanager/addlibrarywizard.cpp michael@344: # Trolltech Bug: michael@344: # Syntax error in qmake project file michael@344: %{l_shtool} subst \ michael@344: -e 's;\(memcheckconfigwidget.ui\) \\$;\1;' \ michael@344: src/plugins/memcheck/memcheck.pro michael@261: echo '' >>src/libs/3rdparty/botan/botan.pro michael@261: for profil in `find . -name '*.pro' | grep -v '[ ]'`; do michael@261: echo 'CONFIG += shared' >>$profil michael@261: done michael@214: michael@214: %build michael@344: # Force linkage to Qt shared libraries due to michael@344: # Qt Creator static build incapable by design. michael@344: l_pkgconfpath=%{l_prefix}/lib/qt/dynamic/pkgconfig michael@344: l_qtdynlflags=`PKG_CONFIG_PATH=$l_pkgconfpath %{l_prefix}/bin/pkg-config --libs-only-L QtCore` michael@344: l_qtdynlibdir=`echo $l_qtdynlflags | %{l_shtool} subst -e 's;\-L[\t ]*\([^\t ]*\);\1;g'` michael@344: %{l_prefix}/bin/qmake qtcreator.pro QMAKE_LIBDIR="$l_qtdynlibdir" michael@344: # Trolltech Bug: michael@344: # (Proc 1) g++ -shared -o libCppEditor.so .obj/release-shared/cppplugin.o ... -lpthread ... michael@344: # (Proc 2) mv -f libCppEditor.so ../../../lib/qtcreator/plugins/Nokia/ michael@344: # make[1]: *** [sub-plugins-make_default-ordered] Error 2 michael@344: # michael@344: # The implemented workaround is to disable parallel make, michael@344: # causing a nearly 100% deceleration in the build. michael@344: %{l_make} %{l_mflags} michael@214: michael@214: %install michael@214: rm -rf $RPM_BUILD_ROOT michael@214: michael@214: # carry out installation procedure michael@261: %{l_make} %{l_mflags} install INSTALL_ROOT="$RPM_BUILD_ROOT%{l_prefix}" michael@214: michael@214: # determine internal file listing michael@214: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@214: michael@214: %files -f files michael@214: michael@214: %clean michael@214: rm -rf $RPM_BUILD_ROOT michael@214: