| 1 | #
|
|---|
| 2 | # http://svn.netlabs.org/qt4
|
|---|
| 3 | #
|
|---|
| 4 |
|
|---|
| 5 | %define ver_major 4
|
|---|
| 6 | %define ver_minore 7
|
|---|
| 7 | %define ver_patch 3
|
|---|
| 8 |
|
|---|
| 9 | %define rpm_release 1
|
|---|
| 10 |
|
|---|
| 11 | %define svn_revision 0
|
|---|
| 12 |
|
|---|
| 13 | %define descr_brief Qt is a software toolkit for developing applications.
|
|---|
| 14 |
|
|---|
| 15 | %define pkg_wps_base QT4
|
|---|
| 16 | %define pkg_wps_folder_id <%{pkg_wps_base}_FOLDER>
|
|---|
| 17 | %define pkg_wps_folder_create %{pkg_wps_base}_FOLDER:WPFolder|Qt 4|<WP_DESKTOP>
|
|---|
| 18 | %define pkg_wps_view_txt() EXENAME=e.exe;PROGTYPE=PROG_PM;PARAMETERS=((%*))
|
|---|
| 19 |
|
|---|
| 20 | %define qt_ qt
|
|---|
| 21 | %define qtM %{qt_}%{ver_major}
|
|---|
| 22 |
|
|---|
| 23 | %define qt_prefix %{_libdir}/%{qtM}
|
|---|
| 24 | %define qt_libdir %{_libdir}
|
|---|
| 25 | %define qt_headerdir %{_includedir}/qt4
|
|---|
| 26 | %define qt_bindir %{qt_prefix}/bin
|
|---|
| 27 | %define qt_plugindir %{qt_prefix}/plugins
|
|---|
| 28 | %define qt_importdir %{qt_prefix}/imports
|
|---|
| 29 | %define qt_demosdir %{qt_prefix}/demos
|
|---|
| 30 | %define qt_examplesdir %{qt_prefix}/examples
|
|---|
| 31 | %define qt_datadir %{_datadir}/%{qtM}
|
|---|
| 32 | %define qt_docdir %{qt_datadir}/doc
|
|---|
| 33 | %define qt_translationdir %{qt_datadir}/translations
|
|---|
| 34 | %define qt_sysconfdir %{_sysconfdir}/xdg
|
|---|
| 35 |
|
|---|
| 36 | #------------------------------------------------------------------------------
|
|---|
| 37 | # main package
|
|---|
| 38 | #------------------------------------------------------------------------------
|
|---|
| 39 |
|
|---|
| 40 | Name: %{qt_}
|
|---|
| 41 | Summary: Qt runtime
|
|---|
| 42 | Group: System Environment/Libraries
|
|---|
| 43 | Version: %{ver_major}.%{ver_minore}.%{ver_patch}
|
|---|
| 44 | Release: %{rpm_release}
|
|---|
| 45 | Vendor: netlabs.org
|
|---|
| 46 |
|
|---|
| 47 | Provides: %{qtM} = %{version}-%{release}
|
|---|
| 48 |
|
|---|
| 49 | License: LGPLv2 with exceptions or GPLv3 with exceptions
|
|---|
| 50 | Url: http://www.qtsoftware.com/
|
|---|
| 51 |
|
|---|
| 52 | Source: qt.zip
|
|---|
| 53 |
|
|---|
| 54 | %description
|
|---|
| 55 | %{descr_brief}
|
|---|
| 56 |
|
|---|
| 57 | This package contains runtime Qt libraries for console applications, including
|
|---|
| 58 | core, network and XML modules.
|
|---|
| 59 |
|
|---|
| 60 | %files
|
|---|
| 61 | %defattr(-,root,root,-)
|
|---|
| 62 | %doc README
|
|---|
| 63 | %{_libdir}/QtCore%{ver_major}.dll
|
|---|
| 64 |
|
|---|
| 65 | %pre
|
|---|
| 66 | /*.cmd*/
|
|---|
| 67 |
|
|---|
| 68 | packages.1 = 'netlabs.org\Qt4\Runtime'
|
|---|
| 69 | packages.0 = 1
|
|---|
| 70 |
|
|---|
| 71 | ver = ''
|
|---|
| 72 | do i = 1 to packages.0
|
|---|
| 73 | ver = GetPkgVersion(packages.i)
|
|---|
| 74 | if (ver \== '') then leave
|
|---|
| 75 | end
|
|---|
| 76 | if (ver == '') then exit 0
|
|---|
| 77 |
|
|---|
| 78 | say; say 'ERROR:'; say
|
|---|
| 79 | say 'You have a WPI package "'packages.i'" version 'ver
|
|---|
| 80 | say 'installed on your system.'; say
|
|---|
| 81 | say 'You cannot have both the WPI and RPM package installed at the same time.'
|
|---|
| 82 | say 'Please de-install the specified WPI package using the WarpIn utility'
|
|---|
| 83 | say 'and try again.'; say
|
|---|
| 84 | exit 1
|
|---|
| 85 |
|
|---|
| 86 | GetPkgVersion: procedure
|
|---|
| 87 | parse arg aPkgId
|
|---|
| 88 | rc = rxFuncAdd('SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs')
|
|---|
| 89 | rc = SysLoadFuncs()
|
|---|
| 90 | WarpInDir = strip(SysIni('USER', 'WarpIN', 'Path'), 'T', '0'x)
|
|---|
| 91 | if (WarpInDir \== '') then do
|
|---|
| 92 | rc = SysFileTree(WarpInDir'\DATBAS_?.INI', 'inis', 'FO')
|
|---|
| 93 | if (rc == 0) then do
|
|---|
| 94 | do i = 1 to inis.0
|
|---|
| 95 | rc = SysIni(inis.i, 'ALL:', 'apps')
|
|---|
| 96 | if (rc == '') then do
|
|---|
| 97 | do j = 1 to apps.0
|
|---|
| 98 | apps.j = strip(apps.j, 'T', '0'x)
|
|---|
| 99 | if (left(apps.j, length(aPkgId)) == aPkgId) then do
|
|---|
| 100 | /* found the app */
|
|---|
| 101 | ver = right(apps.j, length(apps.j) - length(aPkgId) - 1)
|
|---|
| 102 | ver = translate(ver, '.', '\')
|
|---|
| 103 | return ver
|
|---|
| 104 | end
|
|---|
| 105 | end
|
|---|
| 106 | end
|
|---|
| 107 | else do
|
|---|
| 108 | say; say 'ERROR:'; say
|
|---|
| 109 | say 'Failed to access the file "'inis.i'".'; say
|
|---|
| 110 | say 'Please close the WarpIn application or, if it is not running, make sure'
|
|---|
| 111 | say 'that this file is not locked by another process and try again.'; say
|
|---|
| 112 | exit 5
|
|---|
| 113 | end
|
|---|
| 114 | end
|
|---|
| 115 | end
|
|---|
| 116 | end
|
|---|
| 117 | return ''
|
|---|
| 118 |
|
|---|
| 119 | %post
|
|---|
| 120 |
|
|---|
| 121 | %postun
|
|---|
| 122 |
|
|---|
| 123 | %wps_object_delete_all
|
|---|
| 124 |
|
|---|
| 125 | #------------------------------------------------------------------------------
|
|---|
| 126 | %package pm
|
|---|
| 127 | #------------------------------------------------------------------------------
|
|---|
| 128 |
|
|---|
| 129 | Summary: Qt GUI runtime
|
|---|
| 130 | Group: System Environment/Libraries
|
|---|
| 131 |
|
|---|
| 132 | Requires: %{qt_} = %{version}-%{release}
|
|---|
| 133 |
|
|---|
| 134 | Provides: %{qtM}-pm = %{version}-%{release}
|
|---|
| 135 |
|
|---|
| 136 | %description pm
|
|---|
| 137 | %{descr_brief}
|
|---|
| 138 |
|
|---|
| 139 | This package contains runtime Qt libraries for Presentation Manager GUI
|
|---|
| 140 | applications.
|
|---|
| 141 |
|
|---|
| 142 | %files pm
|
|---|
| 143 | %defattr(-,root,root,-)
|
|---|
| 144 | %{_libdir}/QtGui%{ver_major}.dll
|
|---|
| 145 |
|
|---|
| 146 | #------------------------------------------------------------------------------
|
|---|
| 147 | %package demos
|
|---|
| 148 | #------------------------------------------------------------------------------
|
|---|
| 149 | Summary: Demonstration applications for Qt
|
|---|
| 150 | Group: Documentation
|
|---|
| 151 |
|
|---|
| 152 | Requires: %{qt_}-pm = %{version}-%{release}
|
|---|
| 153 |
|
|---|
| 154 | Provides: %{qtM}-demos = %{version}-%{release}
|
|---|
| 155 |
|
|---|
| 156 | %description demos
|
|---|
| 157 | %{descr_brief}
|
|---|
| 158 |
|
|---|
| 159 | This package contains the demo and example Qt applications and their
|
|---|
| 160 | source code. These applications demonstrate the possibilities of the
|
|---|
| 161 | Qt toolkit.
|
|---|
| 162 |
|
|---|
| 163 | %files demos
|
|---|
| 164 | %defattr(-,root,root,-)
|
|---|
| 165 | %{qt_bindir}/qtdemo.exe
|
|---|
| 166 | # @todo put shortcuts to /usr/bin
|
|---|
| 167 | #%if "%{qt_bindir}" != "%{_bindir}"
|
|---|
| 168 | #%{_bindir}/qtdemo.exe copied from launcher.exe
|
|---|
| 169 | #%endif
|
|---|
| 170 | %{qt_demosdir}/
|
|---|
| 171 |
|
|---|
| 172 | %post demos
|
|---|
| 173 |
|
|---|
| 174 | %wps_object_create_begin -n %{name}-demos
|
|---|
| 175 | %pkg_wps_folder_create%
|
|---|
| 176 | %{pkg_wps_base}_DEMO:WPProgram|Examples and Demos|<QT4_FOLDER>|EXENAME=((%{qt_bindir}/qtdemo.exe))
|
|---|
| 177 | #%{pkg_wps_base}_CHANGELOG:WPProgram|ChangeLog|%{pkg_wps_folder_id}|%{pkg_wps_view_txt %{pkg_docdir}/ChangeLog}
|
|---|
| 178 | %wps_object_create_end
|
|---|
| 179 |
|
|---|
| 180 | %postun demos
|
|---|
| 181 | %wps_object_delete_all -n %{name}-demos
|
|---|
| 182 |
|
|---|
| 183 | #------------------------------------------------------------------------------
|
|---|
| 184 | %package linguist
|
|---|
| 185 | #------------------------------------------------------------------------------
|
|---|
| 186 | Summary: Qt Linguist tool
|
|---|
| 187 | Group: Development/Tools
|
|---|
| 188 |
|
|---|
| 189 | Requires: %{qt_}-pm = %{version}-%{release}
|
|---|
| 190 |
|
|---|
| 191 | Provides: %{qtM}-linguist = %{version}-%{release}
|
|---|
| 192 |
|
|---|
| 193 | %description linguist
|
|---|
| 194 | %{descr_brief}
|
|---|
| 195 |
|
|---|
| 196 | This package contains the Qt Linguist tool used to edit the translation files
|
|---|
| 197 | for Qt applications.
|
|---|
| 198 |
|
|---|
| 199 | %files linguist
|
|---|
| 200 | %defattr(-,root,root,-)
|
|---|
| 201 | %{qt_bindir}/linguist.exe
|
|---|
| 202 |
|
|---|
| 203 | %post linguist
|
|---|
| 204 | %wps_object_create_begin -n %{name}-linguist
|
|---|
| 205 | %{wps_qt4_folder}
|
|---|
| 206 | QT4_LINGUIST:WPProgram|Linguist|<QT4_FOLDER>|EXENAME=((%{qt_bindir}/linguist.exe))
|
|---|
| 207 | %wps_object_create_end
|
|---|
| 208 |
|
|---|
| 209 | %postun linguist
|
|---|
| 210 | %wps_object_delete_all -n %{name}-linguist
|
|---|
| 211 |
|
|---|
| 212 | #------------------------------------------------------------------------------
|
|---|
| 213 | %package assistant
|
|---|
| 214 | #------------------------------------------------------------------------------
|
|---|
| 215 | Summary: Qt Assistant tool
|
|---|
| 216 | Group: Development/Tools
|
|---|
| 217 |
|
|---|
| 218 | Requires: %{qt_}-pm = %{version}-%{release}
|
|---|
| 219 |
|
|---|
| 220 | Provides: %{qtM}-assistant = %{version}-%{release}
|
|---|
| 221 |
|
|---|
| 222 | %description assistant
|
|---|
| 223 | %{descr_brief}
|
|---|
| 224 |
|
|---|
| 225 | This package contains the Qt Assistant tool used to read and search the Qt
|
|---|
| 226 | Toolkit reference documentation.
|
|---|
| 227 |
|
|---|
| 228 | %files assistant
|
|---|
| 229 | %defattr(-,root,root,-)
|
|---|
| 230 | %{qt_bindir}/assistant.exe
|
|---|
| 231 |
|
|---|
| 232 | #------------------------------------------------------------------------------
|
|---|
| 233 | %package doc
|
|---|
| 234 | #------------------------------------------------------------------------------
|
|---|
| 235 | Summary: API documentation for Qt
|
|---|
| 236 | Group: Documentation
|
|---|
| 237 | BuildArch: noarch
|
|---|
| 238 |
|
|---|
| 239 | Requires: %{qt_}-assistant = %{version}-%{release}
|
|---|
| 240 |
|
|---|
| 241 | Provides: %{qtM}-doc = %{version}-%{release}
|
|---|
| 242 |
|
|---|
| 243 | %description doc
|
|---|
| 244 | %{descr_brief}
|
|---|
| 245 |
|
|---|
| 246 | This package contains the Qt Toolkit reference documentation that provides the
|
|---|
| 247 | detailed description of all Qt classes and tools.
|
|---|
| 248 |
|
|---|
| 249 | %files doc
|
|---|
| 250 | %defattr(-,root,root,-)
|
|---|
| 251 | %{qt_docdir}/qch/*.qch
|
|---|
| 252 |
|
|---|
| 253 | # @todo assistant.exe -remove-search-index
|
|---|
| 254 |
|
|---|
| 255 | #------------------------------------------------------------------------------
|
|---|
| 256 | %package devel
|
|---|
| 257 | #------------------------------------------------------------------------------
|
|---|
| 258 | Summary: Development files for Qt
|
|---|
| 259 | Group: Development/Libraries
|
|---|
| 260 |
|
|---|
| 261 | Requires: %{qt_}-pm = %{version}-%{release}
|
|---|
| 262 |
|
|---|
| 263 | Provides: %{qt_}-designer = %{version}-%{release}
|
|---|
| 264 |
|
|---|
| 265 | Provides: %{qtM}-devel = %{version}-%{release}
|
|---|
| 266 | Provides: %{qtM}-designer = %{version}-%{release}
|
|---|
| 267 |
|
|---|
| 268 | %description devel
|
|---|
| 269 | %{descr_brief}
|
|---|
| 270 |
|
|---|
| 271 | This package contains the headers, libraries and tools necessary to develop
|
|---|
| 272 | applications using the Qt toolkit. Includes the Qt Designer tool.
|
|---|
| 273 |
|
|---|
| 274 | %files devel
|
|---|
| 275 | %defattr(-,root,root,-)
|
|---|
| 276 | %{qt_bindir}/designer.exe
|
|---|
| 277 |
|
|---|
| 278 | #------------------------------------------------------------------------------
|
|---|
| 279 | %prep
|
|---|
| 280 | #------------------------------------------------------------------------------
|
|---|
| 281 |
|
|---|
| 282 | %if "%{?QT_SOURCE_TREE}" != ""
|
|---|
| 283 | %setup -n "%{qt_}-%{version}-%{release}" -Tc
|
|---|
| 284 | %else
|
|---|
| 285 | %setup -n "%{qt_}-%{version}-%{release}" -q
|
|---|
| 286 | %endif
|
|---|
| 287 |
|
|---|
| 288 | #------------------------------------------------------------------------------
|
|---|
| 289 | %build
|
|---|
| 290 | #------------------------------------------------------------------------------
|
|---|
| 291 |
|
|---|
| 292 | # @todo add to BuildRequires:
|
|---|
| 293 | # libc-devel
|
|---|
| 294 | # gcc
|
|---|
| 295 | # cups-devel
|
|---|
| 296 | # openssl-devel
|
|---|
| 297 | # mysql-devel
|
|---|
| 298 | # psql-devel
|
|---|
| 299 | # pthread-devel
|
|---|
| 300 |
|
|---|
| 301 | die() { echo "ERROR: $@"; exit 1; }
|
|---|
| 302 | check_var() { eval "[ -n \"\$$1\" ] || die \"$1 variable is not set.\""; }
|
|---|
| 303 |
|
|---|
| 304 | # Define Qt source tree
|
|---|
| 305 | if [ -z "%{QT_SOURCE_TREE}" ]; then QT_SOURCE_TREE=.
|
|---|
| 306 | else QT_SOURCE_TREE="%{QT_SOURCE_TREE}"
|
|---|
| 307 | fi
|
|---|
| 308 |
|
|---|
| 309 | QT_SOURCE_TREE_D=$(echo "%{QT_SOURCE_TREE}" | tr '/' '\\')
|
|---|
| 310 |
|
|---|
| 311 | # Sanity checks (laking these would turn off features that must be ON)
|
|---|
| 312 | check_var "CUPS_INCLUDEPATHH"
|
|---|
| 313 | check_var "OPENSSL_INCLUDEPATH"
|
|---|
| 314 | check_var "MYSQL_INCLUDEPATH"
|
|---|
| 315 | check_var "MYSQL_LIBS"
|
|---|
| 316 | check_var "PSQL_INCLUDEPATH"
|
|---|
| 317 | check_var "PSQL_LIBS"
|
|---|
| 318 |
|
|---|
| 319 | # CMD.EXE is required by the build process for now
|
|---|
| 320 | export MAKESHELL=%{os2_boot_drive}\\OS2\\CMD.EXE
|
|---|
| 321 |
|
|---|
| 322 | # Qt doesn't understand /@unixroot in library paths, replace it with $(UNIXROOT)
|
|---|
| 323 | library_paths=$(echo \
|
|---|
| 324 | --official-build-quiet %{svn_revision} \
|
|---|
| 325 | -prefix "%{qt_prefix}" \
|
|---|
| 326 | -datadir "%{qt_datadir}" \
|
|---|
| 327 | -libdir "%{qt_libdir}" \
|
|---|
| 328 | -headerdir "%{qt_headerdir}" \
|
|---|
| 329 | -bindir "%{qt_bindir}" \
|
|---|
| 330 | -plugindir "%{qt_plugindir}" \
|
|---|
| 331 | -importdir "%{qt_importdir}" \
|
|---|
| 332 | -demosdir "%{qt_demosdir}" \
|
|---|
| 333 | -examplesdir "%{qt_examplesdir}" \
|
|---|
| 334 | -docdir "%{qt_docdir}" \
|
|---|
| 335 | -translationdir "%{qt_translationdir}" \
|
|---|
| 336 | -sysconfdir "%{qt_sysconfdir}" \
|
|---|
| 337 | | sed -re 's,/@unixroot,$(UNIXROOT),g')
|
|---|
| 338 |
|
|---|
| 339 | cmd /c $QT_SOURCE_TREE_D\\configure.cmd $library_paths
|
|---|
| 340 |
|
|---|
| 341 | make -j%MAKE_JOBS%
|
|---|
| 342 | make docs -j%MAKE_JOBS%
|
|---|
| 343 |
|
|---|
| 344 | #------------------------------------------------------------------------------
|
|---|
| 345 | %install
|
|---|
| 346 | #------------------------------------------------------------------------------
|
|---|
| 347 |
|
|---|
| 348 | rm -rf %{buildroot}
|
|---|
| 349 |
|
|---|
| 350 | make install INSTALL_ROOT=%{buildroot}
|
|---|
| 351 |
|
|---|
| 352 | # @todo remove
|
|---|
| 353 | #mkdir -p %{buildroot}/%{qt_libdir}
|
|---|
| 354 | #cp QtCore4.dll %{buildroot}/%{qt_libdir}/
|
|---|
| 355 | #cp QtGui4.dll %{buildroot}/%{qt_libdir}/
|
|---|
| 356 | #mkdir -p %{buildroot}/%{qt_bindir}
|
|---|
| 357 | #cp qtdemo.exe %{buildroot}/%{qt_bindir}/
|
|---|
| 358 | #cp designer.exe %{buildroot}/%{qt_bindir}/
|
|---|
| 359 | #cp linguist.exe %{buildroot}/%{qt_bindir}/
|
|---|
| 360 | #cp assistant.exe %{buildroot}/%{qt_bindir}/
|
|---|
| 361 | #mkdir -p %{buildroot}/%{qt_demosdir}
|
|---|
| 362 | #cp -R demos/* %{buildroot}/%{qt_demosdir}/
|
|---|
| 363 | #mkdir -p %{buildroot}/%{qt_examplesdir}
|
|---|
| 364 | #cp -R examples/* %{buildroot}/%{qt_examplesdir}/
|
|---|
| 365 | #mkdir -p %{buildroot}/%{qt_docdir}
|
|---|
| 366 | #cp -R doc/* %{buildroot}/%{qt_docdir}/
|
|---|
| 367 |
|
|---|
| 368 | #------------------------------------------------------------------------------
|
|---|
| 369 | %clean
|
|---|
| 370 | #------------------------------------------------------------------------------
|
|---|
| 371 |
|
|---|
| 372 | rm -rf %{buildroot}
|
|---|
| 373 |
|
|---|
| 374 | #------------------------------------------------------------------------------
|
|---|
| 375 | %changelog
|
|---|
| 376 |
|
|---|
| 377 | * Sun Oct 31 2010 Dmitry A. Kuminov <coding/dmik.org> - 4.6.3-1
|
|---|
| 378 | - test version
|
|---|