# # http://svn.netlabs.org/qt4 # # If you are a packager, please read HowToDistribute.txt for general # instructions. # Name: qt4 Vendor: netlabs.org License: LGPLv2 with exceptions or GPLv3 with exceptions Url: http://www.qtsoftware.com/ %define ver_major 4 %define ver_minor 7 %define ver_patch 3 %define os2_release 2 %define rpm_release 1 %define svn_url http://svn.netlabs.org/repos/qt4/tags/%{version} %define descr_brief Qt is a software toolkit for developing applications. %define pkg_wps_base QT4 %define pkg_wps_folder_id <%{pkg_wps_base}_FOLDER> %define pkg_wps_folder_create %{pkg_wps_base}_FOLDER:WPFolder|Qt 4| %define pkg_wps_view_txt() EXENAME=e.exe;PROGTYPE=PROG_PM;PARAMETERS=((%*)) %define pkg_docdir %{_docdir}/%{name} %if 0%{?os2_release} Version: %{ver_major}.%{ver_minor}.%{ver_patch}.%{os2_release} %else Version: %{ver_major}.%{ver_minor}.%{ver_patch} %endif Release: %{rpm_release} Source: %{name}-%{version}.zip #BuildRequires: gnumake (when available) BuildRequires: findutils #BuildRequires: mapsym (os2tk45, when available) BuildRequires: libc-devel BuildRequires: gcc BuildRequires: gcc-wlink BuildRequires: gcc-wrc #BuildRequires: cups-devel (when available) BuildRequires: openssl-devel BuildRequires: pthread-devel #BuildRequires: mysql-devel (when available) #BuildRequires: psql-devel (when available) # @todo add wrc support to Qt # @todo add proper %attr for .exe files #------------------------------------------------------------------------------ # commons #------------------------------------------------------------------------------ # process command line arguments %if "%{?QT_SOURCE_TREE}" == "" %define QT_SOURCE_TREE . %else %define skip_prep_export 1 %endif # installation paths %define qt_prefix %{_libdir}/%{name} %define qt_libdir %{_libdir} %define qt_headerdir %{_includedir} %define qt_bindir %{qt_prefix}/bin %define qt_plugindir %{qt_prefix}/plugins %define qt_importdir %{qt_prefix}/imports %define qt_demosdir %{qt_prefix}/demos %define qt_examplesdir %{qt_prefix}/examples %define qt_datadir %{_datadir}/%{name} %define qt_docdir %{qt_datadir}/doc %define qt_translationdir %{qt_datadir}/translations %define qt_sysconfdir %{_sysconfdir}/xdg # disable lxlite compression (Qt EXEs and DLLs are already compressed) %define __os_install_post %{nil} #------------------------------------------------------------------------------ # main package #------------------------------------------------------------------------------ Summary: Qt 4 (dummy package) Group: System Environment/Libraries %description %{descr_brief} This package is not actually generated (due to the missing %files section). It is present only because RPM requires Summary: and %description sections for the main package to exist. #------------------------------------------------------------------------------ %package -n lib%{name} #------------------------------------------------------------------------------ Summary: Qt 4 runtime libraries Group: System Environment/Libraries %description -n lib%{name} %{descr_brief} This package contains runtime Qt libraries for console applications, including core, network and XML modules. %files -n lib%{name} %defattr(-,root,root,-) %dir %{pkg_docdir}/ %docdir %{pkg_docdir}/ %{pkg_docdir}/* %if "%{qt_prefix}" != "%{_prefix}" %dir %{qt_prefix}/ %endif %if "%{qt_libdir}" != "%{_libdir}" %dir %{qt_libdir}/ %endif %if "%{qt_bindir}" != "%{_bindir}" %dir %{qt_bindir}/ %endif %dir %{qt_plugindir} %{qt_plugindir}/bearer/ %{qt_plugindir}/codecs/ %dir %{qt_plugindir}/sqldrivers/ %{qt_plugindir}/sqldrivers/* %exclude %{qt_plugindir}/sqldrivers/qmysql%{ver_major}.dll %exclude %{qt_plugindir}/sqldrivers/qpsql%{ver_major}.dll %dir %{qt_datadir}/ %dir %{qt_docdir}/ %dir %{qt_docdir}/qch/ %dir %{qt_translationdir}/ %{qt_translationdir}/qt_??.qm %{qt_translationdir}/qt_??_??.qm %if "%{qt_sysconfdir}" != "%{_sysconfdir}" && "%{qt_sysconfdir}" != "%{_sysconfdir}/xdg" %dir %{qt_sysconfdir}/ %endif %{qt_libdir}/QtCore%{ver_major}.dll %{qt_libdir}/QtNet%{ver_major}.dll %{qt_libdir}/QtScri%{ver_major}.dll %{qt_libdir}/QtSql%{ver_major}.dll %{qt_libdir}/QtTest%{ver_major}.dll %{qt_libdir}/QtXml%{ver_major}.dll %{qt_libdir}/QtXmlP%{ver_major}.dll %pre -n lib%{name} %warpin_conflicts_begin netlabs.org\Qt4\Runtime %warpin_conflicts_end %post -n lib%{name} # clean up the plugin/font cache to remove old entries (@todo other users?) rm -f "$HOME/.config/Trolltech.ini" #------------------------------------------------------------------------------ %package -n lib%{name}-sql-mysql #------------------------------------------------------------------------------ Summary: Qt 4 MySQL database driver Group: System Environment/Libraries Requires: lib%{name} = %{version}-%{release} %description -n lib%{name}-sql-mysql %{descr_brief} This package contains the MySQL plugin for Qt 4. %files -n lib%{name}-sql-mysql %defattr(-,root,root,-) %{qt_plugindir}/sqldrivers/qmysql%{ver_major}.dll #------------------------------------------------------------------------------ %package -n lib%{name}-sql-psql #------------------------------------------------------------------------------ Summary: Qt 4 PostgreSQL database driver Group: System Environment/Libraries Requires: lib%{name} = %{version}-%{release} %description -n lib%{name}-sql-psql %{descr_brief} This package contains the PostgreSQL plugin for Qt 4. %files -n lib%{name}-sql-psql %defattr(-,root,root,-) %{qt_plugindir}/sqldrivers/qpsql%{ver_major}.dll #------------------------------------------------------------------------------ %package -n lib%{name}-gui #------------------------------------------------------------------------------ Summary: Qt 4 GUI runtime libraries Group: System Environment/Libraries Requires: lib%{name} = %{version}-%{release} %description -n lib%{name}-gui %{descr_brief} This package contains runtime Qt libraries for Presentation Manager GUI applications. %files -n lib%{name}-gui %defattr(-,root,root,-) %dir %{qt_plugindir}/designer %{qt_plugindir}/designer/qdeclv.dll %{qt_plugindir}/accessible/ %{qt_plugindir}/graphicssystems/ %{qt_plugindir}/iconengines/ %{qt_plugindir}/imageformats/ %{qt_plugindir}/qmltooling/ %{qt_translationdir}/qt_help_??.qm %{qt_translationdir}/qt_help_??_??.qm %dir %{qt_importdir}/ %{qt_importdir}/Qt/ %{qt_libdir}/QtCLuc%{ver_major}.dll %{qt_libdir}/QtDecl%{ver_major}.dll %{qt_libdir}/QtGui%{ver_major}.dll %{qt_libdir}/QtHelp%{ver_major}.dll %{qt_libdir}/QtScTl%{ver_major}.dll %{qt_libdir}/QtSvg%{ver_major}.dll #------------------------------------------------------------------------------ %package -n lib%{name}-webkit #------------------------------------------------------------------------------ Summary: Qt 4 WebKit runtime libraries Group: System Environment/Libraries Requires: lib%{name}-gui = %{version}-%{release} %description -n lib%{name}-webkit %{descr_brief} This package contains runtime Qt libraries for applications based on the WebKit technology. %files -n lib%{name}-webkit %defattr(-,root,root,-) %{qt_plugindir}/designer/qwebv.dll %{qt_importdir}/QtWebKit/ %{qt_libdir}/QtWebK%{ver_major}.dll #------------------------------------------------------------------------------ %package -n lib%{name}-designer #------------------------------------------------------------------------------ Summary: Qt 4 Designer runtime libraries Group: System Environment/Libraries Requires: lib%{name}-gui = %{version}-%{release} %description -n lib%{name}-designer %{descr_brief} This package contains runtime Qt libraries for Designer components. %files -n lib%{name}-designer %defattr(-,root,root,-) %{qt_libdir}/QtDsgC%{ver_major}.dll %{qt_libdir}/QtDsgn%{ver_major}.dll #------------------------------------------------------------------------------ %package demos #------------------------------------------------------------------------------ Summary: Qt 4 demos and examples Group: Documentation Requires: lib%{name}-gui = %{version}-%{release} Requires: lib%{name}-designer = %{version}-%{release} Requires: lib%{name}-webkit = %{version}-%{release} Requires: %{name}-doc = %{version}-%{release} %description demos %{descr_brief} This package contains the demo and example Qt applications and their source code. These applications demonstrate the possibilities of the Qt toolkit. %files demos %defattr(-,root,root,-) %{qt_plugindir}/designer/ %exclude %{qt_plugindir}/designer/qdeclv.dll %exclude %{qt_plugindir}/designer/qwebv.dll %{qt_bindir}/qtdemo.exe %{qt_examplesdir} %{qt_demosdir} %post demos %wps_object_create_begin -n %{name}-demos %{pkg_wps_folder_create} %{pkg_wps_base}_DEMO:WPProgram|Examples and Demos|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/qtdemo.exe)) %wps_object_create_end # clean up the qtdemo doc cache, otherwise the demo descriptions may not show up # if the old cache contains links to non-existent doc files (@todo other users?) rm -f "$HOME/.local/share/data/Trolltech/Assistant/qtdemo_%{ver_major}.%{ver_minor}.%{ver_patch}.qhc" %postun demos %wps_object_delete_all -n %{name}-demos #------------------------------------------------------------------------------ %package qmlviewer #------------------------------------------------------------------------------ Summary: Qt 4 QML Viewer tool Group: Development/Tools Requires: lib%{name}-gui = %{version}-%{release} %description qmlviewer %{descr_brief} This package contains the Qt QML Viewer tool that allows to view QML files. %files qmlviewer %defattr(-,root,root,-) %{qt_bindir}/qmlviewer.exe %post qmlviewer %wps_object_create_begin -n %{name}-qmlviewer %{pkg_wps_folder_create} %{pkg_wps_base}_QMLVIEWER:WPProgram|QML Viewer|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/qmlviewer.exe)) %wps_object_create_end %postun qmlviewer %wps_object_delete_all -n %{name}-qmlviewer #------------------------------------------------------------------------------ %package linguist #------------------------------------------------------------------------------ Summary: Qt 4 Linguist tool Group: Development/Tools Requires: lib%{name}-gui = %{version}-%{release} %description linguist %{descr_brief} This package contains the Qt Linguist tool used to edit the translation files for Qt applications. %files linguist %defattr(-,root,root,-) %{qt_translationdir}/linguist_??.qm %{qt_translationdir}/linguist_??_??.qm %dir %{qt_datadir}/phrasebooks/ %{qt_datadir}/phrasebooks/* %{qt_bindir}/linguist.exe %post linguist %wps_object_create_begin -n %{name}-linguist %{pkg_wps_folder_create} %{pkg_wps_base}_LINGUIST:WPProgram|Linguist|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/linguist.exe)) %wps_object_create_end %postun linguist %wps_object_delete_all -n %{name}-linguist #------------------------------------------------------------------------------ %package assistant #------------------------------------------------------------------------------ Summary: Qt 4 Assistant tool Group: Development/Tools Requires: lib%{name}-gui = %{version}-%{release} %description assistant %{descr_brief} This package contains the Qt Assistant tool used to read and search the Qt Toolkit reference documentation. %files assistant %defattr(-,root,root,-) %{qt_translationdir}/assistant_??.qm %{qt_translationdir}/assistant_??_??.qm %{qt_bindir}/assistant.exe %post assistant %wps_object_create_begin -n %{name}-assistant %{pkg_wps_folder_create} %{pkg_wps_base}_ASSISTANT:WPProgram|Assistant|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/assistant.exe)) %wps_object_create_end # clean up the assistant cache & search index (@todo other users?) rm -f "$HOME/.local/share/data/Trolltech/Assistant/assistant.qch.%{ver_major}.%{ver_minor}" rm -f "$HOME/.local/share/data/Trolltech/Assistant/qthelpcollection_%{ver_major}.%{ver_minor}.%{ver_patch}.qhc" rm -rf "$HOME/.local/share/data/Trolltech/Assistant/.qthelpcollection_%{ver_major}.%{ver_minor}.%{ver_patch}" %postun assistant %wps_object_delete_all -n %{name}-assistant #------------------------------------------------------------------------------ %package designer #------------------------------------------------------------------------------ Summary: Qt 4 Designer tool Group: Development/Tools Requires: lib%{name}-gui = %{version}-%{release} Requires: lib%{name}-designer = %{version}-%{release} %description designer %{descr_brief} This package contains the Qt Designer tool used to for designing and building graphical user interfaces from Qt components. %files designer %defattr(-,root,root,-) %{qt_translationdir}/designer_??.qm %{qt_translationdir}/designer_??_??.qm %{qt_bindir}/designer.exe %post designer %wps_object_create_begin -n %{name}-designer %{pkg_wps_folder_create} %{pkg_wps_base}_DESIGNER:WPProgram|Designer|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/designer.exe)) %wps_object_create_end %postun designer %wps_object_delete_all -n %{name}-designer #------------------------------------------------------------------------------ %package devel-tools #------------------------------------------------------------------------------ Summary: Qt 4 development tools Group: Development/Tools Requires: lib%{name}-gui = %{version}-%{release} %description devel-tools %{descr_brief} This package contains tools used to assist in Qt development, including PixelTool, Help Converter and other applications. %files devel-tools %defattr(-,root,root,-) %{qt_bindir}/lconvert.exe %{qt_bindir}/pixeltool.exe %{qt_bindir}/qcollectiongenerator.exe %{qt_bindir}/qdoc3.exe %{qt_bindir}/qhelpconverter.exe %{qt_bindir}/qhelpgenerator.exe %{qt_bindir}/qt3to4.exe %{qt_bindir}/qttracereplay.exe %{qt_bindir}/xmlpatterns.exe %{qt_bindir}/xmlpatternsvalidator.exe %post devel-tools %wps_object_create_begin -n %{name}-devel-tools %{pkg_wps_folder_create} %{pkg_wps_base}_PIXELTOOL:WPProgram|Pixel Tool|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/pixeltool.exe)) %{pkg_wps_base}_HELPCONVERTER:WPProgram|Help Converter|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/qhelpconverter.exe)) %wps_object_create_end %postun devel-tools %wps_object_delete_all -n %{name}-devel-tools #------------------------------------------------------------------------------ %package doc #------------------------------------------------------------------------------ Summary: Qt 4 API documentation Group: Documentation BuildArch: noarch Requires: lib%{name} = %{version}-%{release} Requires: %{name}-assistant = %{version}-%{release} %description doc %{descr_brief} This package contains the Qt Toolkit reference documentation that provides the detailed description of all Qt classes and tools. %files doc %defattr(-,root,root,-) %doc %{qt_docdir}/qch/*.qch %post doc %wps_object_create_begin -n %{name}-doc %{pkg_wps_folder_create} %{pkg_wps_base}_README_FOLDER:WPFolder|Readme Files|%{pkg_wps_folder_id} %{pkg_wps_base}_README:WPShadow|README|<%{pkg_wps_base}_README_FOLDER>|SHADOWID=((%{pkg_docdir}/README)) %{pkg_wps_base}_CHANGES:WPShadow|CHANGES|<%{pkg_wps_base}_README_FOLDER>|SHADOWID=((%{pkg_docdir}/changes-4.7.3)) %{pkg_wps_base}_README_OS2:WPShadow|README.OS2|<%{pkg_wps_base}_README_FOLDER>|SHADOWID=((%{pkg_docdir}/README.OS2)) %{pkg_wps_base}_CHANGES_OS2:WPShadow|CHANGES.OS2|<%{pkg_wps_base}_README_FOLDER>|SHADOWID=((%{pkg_docdir}/CHANGES.OS2)) %wps_object_create_end %postun doc %wps_object_delete_all -n %{name}-doc #------------------------------------------------------------------------------ %package -n lib%{name}-devel #------------------------------------------------------------------------------ Summary: Qt 4 development files Group: Development/Libraries Requires: lib%{name}-gui = %{version}-%{release} Requires: lib%{name}-designer = %{version}-%{release} %description -n lib%{name}-devel %{descr_brief} This package contains the headers, libraries and tools necessary to develop applications using the Qt toolkit. %files -n lib%{name}-devel %defattr(-,root,root,-) %if "%{qt_headerdir}" != "%{_includedir}" %dir %{qt_headerdir}/ %endif %{qt_headerdir}/* %exclude %{qt_headerdir}/Qt/QtWebKit %exclude %{qt_headerdir}/Qt/qgraphicswebview.h %exclude %{qt_headerdir}/Qt/qweb*.h %exclude %{qt_headerdir}/QtWebKit/ %{qt_libdir}/*.lib %{qt_libdir}/*.prl %exclude %{qt_libdir}/QtWebKit%{ver_major}.lib %exclude %{qt_libdir}/QtWebKit.prl %dir %{qt_datadir}/mkspecs/ %{qt_datadir}/mkspecs/* %exclude %{qt_datadir}/mkspecs/modules/qt_webkit_version.pri %{qt_datadir}/q3porting.xml %{qt_bindir}/lrelease.exe %{qt_bindir}/lupdate.exe %{qt_bindir}/moc.exe %if "%{qt_bindir}" != "%{_bindir}" %{_bindir}/qmake.exe %endif %{qt_bindir}/qmake.exe %{qt_bindir}/rcc.exe %{qt_bindir}/uic.exe #------------------------------------------------------------------------------ %package -n lib%{name}-webkit-devel #------------------------------------------------------------------------------ Summary: Qt 4 WebKit development files Group: Development/Libraries Requires: lib%{name}-webkit = %{version}-%{release} Requires: lib%{name}-devel = %{version}-%{release} %description -n lib%{name}-webkit-devel %{descr_brief} This package contains the headers, libraries and tools necessary to develop applications using the Qt WebKit technology. %files -n lib%{name}-webkit-devel %defattr(-,root,root,-) %{qt_headerdir}/Qt/QtWebKit %{qt_headerdir}/Qt/qgraphicswebview.h %{qt_headerdir}/Qt/qweb*.h %{qt_headerdir}/QtWebKit/ %{qt_libdir}/QtWebKit%{ver_major}.lib %{qt_libdir}/QtWebKit.prl %{qt_datadir}/mkspecs/modules/qt_webkit_version.pri #------------------------------------------------------------------------------ %package devel-kit #------------------------------------------------------------------------------ Summary: Qt 4 development kit Group: Development/Libraries Requires: %{name}-demos = %{version}-%{release} Requires: %{name}-qmlviewer = %{version}-%{release} Requires: %{name}-linguist = %{version}-%{release} Requires: %{name}-assistant = %{version}-%{release} Requires: %{name}-designer = %{version}-%{release} Requires: %{name}-devel-tools = %{version}-%{release} Requires: %{name}-doc = %{version}-%{release} Requires: lib%{name}-devel = %{version}-%{release} Requires: lib%{name}-webkit-devel = %{version}-%{release} %description devel-kit %{descr_brief} This meta package installs all individual packages containing various Qt development components, including the Qt headers and libraries, the Linguist, Assistant and Designer applications, development tools, example Qt applications and the API documentation. %files devel-kit #------------------------------------------------------------------------------ %prep #------------------------------------------------------------------------------ %if !0%{?skip_prep} %if 0%{?master_mode} %if !0%{?skip_prep_export} # get clean source tree from SVN (both for building and for SRPM) %setup -n "%{name}-%{version}" -Tc svn export %{svn_url} . --force rm -f "%{_sourcedir}/%{name}-%{version}.zip" (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}.zip" "%{name}-%{version}") %else # use source tree in %{QT_SOURCE_TREE} (e.g. shadow build) %setup -n "%{name}-%{version}" -Tc%{?skip_prep_clean:D} %endif %else # use source zip %setup -q %endif %endif # if !0%{?skip_prep} #------------------------------------------------------------------------------ %build #------------------------------------------------------------------------------ %if !0%{?skip_build} die() { echo "ERROR: $@"; exit 1; } check_var() { eval "[ -n \"\$$1\" ] || die \"$1 variable is not set.\""; } %if "%{?svn_revision}" == "" QT_BUILD_ID=$(svn info %{svn_url} | sed -nre 's/^Last Changed Rev: ([0-9]+)$/\1/p') [ -z "$QT_BUILD_ID" ] && die "Cannot determine SVN revision." %else QT_BUILD_ID=%{svn_revision} %endif # Qt source tree (DOS format) QT_SOURCE_TREE_D=$(echo "%{QT_SOURCE_TREE}" | tr '/' '\\') # Sanity checks (laking these would turn off features that must be ON) check_var "CUPS_INCLUDEPATH" check_var "MYSQL_INCLUDEPATH" check_var "MYSQL_LIBS" check_var "PSQL_INCLUDEPATH" check_var "PSQL_LIBS" # Mapsym must be present (for debug info packages) [ -z "$(mapsym 2>&1)" ] && die "Cannot find mapsym tool." # Non-root UNIXROOT is not currently supported because of make install # that will install to a subtree in such case (which is not expected # by %install below). @todo One solution is to move everything from that # subtree right to %{buildroot}/@unixroot after make install. [ -z "$(echo "$UNIXROOT" | sed -re 's/^[a-bA-b]:$//')" ] || \ die "UNIXROOT must be the root directory" [ -z "$MAKE_JOBS" ] && MAKE_JOBS=1 # Qt links to some OS/2 DLLs directly (w/o import libs) export LIBRARY_PATH=%{os2_boot_drive}/OS2/DLL\;%{os2_boot_drive}/MPTN/DLL\;$LIBRARY_PATH # CMD.EXE is required by the build process for now export MAKESHELL=%{os2_boot_drive}\\OS2\\CMD.EXE library_paths=' --official-build-quiet $QT_BUILD_ID -prefix "%{qt_prefix}" -datadir "%{qt_datadir}" -libdir "%{qt_libdir}" -headerdir "%{qt_headerdir}" -bindir "%{qt_bindir}" -plugindir "%{qt_plugindir}" -importdir "%{qt_importdir}" -demosdir "%{qt_demosdir}" -examplesdir "%{qt_examplesdir}" -docdir "%{qt_docdir}" -translationdir "%{qt_translationdir}" -sysconfdir "%{qt_sysconfdir}"' BUILDDIR_D=$(echo "%{_builddir}/%{buildsubdir}" | sed -re 's,/,\\,g') # make sure the right DLLs are used by the build (and in particular by qdoc # in make docs) in case if there is another Qt version installed export PATH="$BUILDDIR_D\\bin\;$PATH" export BEGINLIBPATH="$BUILDDIR_D\\bin\;$BEGINLIBPATH" cmd /c $QT_SOURCE_TREE_D\\configure.cmd $library_paths make -j$MAKE_JOBS %if !0%{?skip_build_docs} # qdoc needs the qsqlite plugin but nothing is installed to target locations # yet, so generate qt.conf to override paths echo \ "[Paths] Prefix = .. Settings = \$(ETC)/xdg Examples = examples Demos = demos" \ > "%{_builddir}/%{buildsubdir}/bin/qt.conf" make docs -j$MAKE_JOBS rm -f "%{_builddir}/%{buildsubdir}/bin/qt.conf" %endif %endif # if !0%{?skip_build} #------------------------------------------------------------------------------ %install #------------------------------------------------------------------------------ %if !0%{?skip_install} rm -rf %{buildroot} # Qt links to some OS/2 DLLs directly (w/o import libs) export LIBRARY_PATH=%{os2_boot_drive}/OS2/DLL\;%{os2_boot_drive}/MPTN/DLL\;$LIBRARY_PATH # CMD.EXE is required by the build process for now export MAKESHELL=%{os2_boot_drive}\\OS2\\CMD.EXE # exclude install_htmldocs from install targets make install_subtargets install_qchdocs install_qmake install_mkspecs \ INSTALL_ROOT=$(echo "%{buildroot}/@unixroot" | sed -re 's,/,\\,g') # copy READMEs (make install doesn't do that) mkdir -p "%{buildroot}/%{pkg_docdir}/" cp -dp \ %{QT_SOURCE_TREE}/LICENSE.* \ "%{QT_SOURCE_TREE}/LGPL_EXCEPTION.txt" \ "%{QT_SOURCE_TREE}/README" \ "%{QT_SOURCE_TREE}/changes-%{ver_major}.%{ver_minor}.%{ver_patch}" \ "%{QT_SOURCE_TREE}/README.OS2" \ "%{QT_SOURCE_TREE}/CHANGES.OS2" \ "%{buildroot}/%{pkg_docdir}/" # remove *.dll from bin (they also live in %{qt_libdir}) dlls=$(find "%{buildroot}/%{qt_bindir}/" -type f -name *.dll) rm -f $dlls ${dlls%.*}.sym # remove translations we don't need rm -f %{buildroot}/%{qt_translationdir}/qtconfig_??.qm \ %{buildroot}/%{qt_translationdir}/qtconfig_??_??.qm rm -f %{buildroot}/%{qt_translationdir}/qvfb_??.qm \ %{buildroot}/%{qt_translationdir}/qvfb_??_??.qm # move qmake.exe to %{_bindir} (to have it in PATH) and symlink back to qt4/bin %if "%{qt_bindir}" != "%{_bindir}" mkdir -p "%{buildroot}/%{_bindir}/" mv "%{buildroot}/%{qt_bindir}/qmake.exe" "%{buildroot}/%{_bindir}/" ln -s "%{_bindir}/qmake.exe" "%{buildroot}/%{qt_bindir}/qmake.exe" mv "%{buildroot}/%{qt_bindir}/qmake.sym" "%{buildroot}/%{_bindir}/" %endif # @todo temporarily split out .sym files (until we generate -debuginfo packages) rm -rf %{buildroot}.sym for f in $(cd "%{buildroot}" && find -type f -name "*.sym"); do fd="${f%/*}"/ [ "$fd" = "$f/" ] && fd= [ -d "%{buildroot}.sym/$fd" ] || mkdir -p "%{buildroot}.sym/$fd" mv "%{buildroot}/$f" "%{buildroot}.sym/$fd" done %endif # if !0%{?skip_install} #------------------------------------------------------------------------------ %clean #------------------------------------------------------------------------------ %if !0%{?skip_clean} %if 0%{?master_mode} %if "%{?create_zips_script}" != "" # @todo put split out .sym files back (cd "%{buildroot}.sym" && find . -type f -name '*.sym' -exec mv "{}" "%{buildroot}/{}" \;) rm -rf "%{buildroot}.sym" %{create_zips_script} all "%{buildroot}" "%{_topdir}/zip" %endif %endif rm -rf %{buildroot} %endif # if !0%{?skip_clean} #------------------------------------------------------------------------------ %changelog * Fri Mar 22 2013 Dmitriy Kuminov 4.7.3.2-1 - New release 4.7.3.2 (4.7.3 GA2). See %{pkg_docdir}/CHANGES.OS2 for more information. * Thu Sep 15 2011 Dmitriy Kuminov 4.7.3-1 - New release 4.7.3. See %{pkg_docdir}/changes-4.7.3 and %{pkg_docdir}/CHANGES.OS2 for more information.