Changeset 1068 for packaging/qt.spec
- Timestamp:
- Sep 9, 2011, 2:52:48 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
packaging/qt.spec
r1062 r1068 2 2 # http://svn.netlabs.org/qt4 3 3 # 4 5 6 7 8 9 10 11 4 12 5 13 %define ver_major 4 6 %define ver_minor e714 %define ver_minor 7 7 15 %define ver_patch 3 8 16 17 18 9 19 %define rpm_release 1 10 20 11 %define svn_revision 021 %define svn_revision 0 12 22 13 23 %define descr_brief Qt is a software toolkit for developing applications. … … 18 28 %define pkg_wps_view_txt() EXENAME=e.exe;PROGTYPE=PROG_PM;PARAMETERS=((%*)) 19 29 20 %define qt_ qt 21 %define qtM %{qt_}%{ver_major} 22 30 %define pkg_docdir %{_docdir}/%{name} 31 32 %if 0%{?os2_release} 33 Version: %{ver_major}.%{ver_minor}.%{ver_patch}.%{os2_release} 34 %else 35 Version: %{ver_major}.%{ver_minor}.%{ver_patch} 36 %endif 37 Release: %{rpm_release} 38 39 Source: %{name}-%{version}.zip 40 41 #BuildRequires: gnumake (when available) 42 BuildRequires: libc-devel 43 BuildRequires: gcc 44 BuildRequires: gcc-wlink 45 BuildRequires: gcc-wrc 46 #BuildRequires: cups-devel (when available) 47 BuildRequires: openssl-devel 48 BuildRequires: pthread-devel 49 #BuildRequires: mysql-devel (when available) 50 #BuildRequires: psql-devel (when available) 51 52 # @todo add wrc support to Qt! 53 54 #------------------------------------------------------------------------------ 55 # commons 56 #------------------------------------------------------------------------------ 57 58 # process command line arguments 59 %if "%{?QT_SOURCE_TREE}" == "" 60 %define QT_SOURCE_TREE . 61 %endif 62 63 %if "%{?QT_BUILD_TREE}" != "" 64 %define skip_prep 1 65 %define skip_build 1 66 %define skip_install 1 67 %endif 68 69 # @todo temporary 70 %define skip_prep_export 1 71 72 # installation paths 23 73 %define qt_prefix %{_libdir}/%{qtM} 24 74 %define qt_libdir %{_libdir} … … 34 84 %define qt_sysconfdir %{_sysconfdir}/xdg 35 85 86 87 36 88 #------------------------------------------------------------------------------ 37 89 # main package 38 90 #------------------------------------------------------------------------------ 39 91 40 Name: %{qt_}41 92 Summary: Qt runtime 42 93 Group: System Environment/Libraries 43 Version: %{ver_major}.%{ver_minore}.%{ver_patch}44 Release: %{rpm_release}45 Vendor: netlabs.org46 94 47 95 Provides: %{qtM} = %{version}-%{release} 48 49 License: LGPLv2 with exceptions or GPLv3 with exceptions50 Url: http://www.qtsoftware.com/51 52 Source: qt.zip53 96 54 97 %description … … 60 103 %files 61 104 %defattr(-,root,root,-) 62 %doc README 63 %{_libdir}/QtCore%{ver_major}.dll 105 %{qt_libdir}/QtCore%{ver_major}.dll 64 106 65 107 %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 108 109 %warpin_conflicts_begin 110 netlabs.org\Qt4\Runtime 111 %warpin_conflicts_end 124 112 125 113 #------------------------------------------------------------------------------ … … 130 118 Group: System Environment/Libraries 131 119 132 Requires: %{ qt_} = %{version}-%{release}120 Requires: %{} = %{version}-%{release} 133 121 134 122 Provides: %{qtM}-pm = %{version}-%{release} … … 142 130 %files pm 143 131 %defattr(-,root,root,-) 144 %{ _libdir}/QtGui%{ver_major}.dll145 146 #------------------------------------------------------------------------------ 147 %package demos148 #------------------------------------------------------------------------------ 149 Summary: Demonstrationapplications for Qt132 %{_libdir}/QtGui%{ver_major}.dll 133 134 #------------------------------------------------------------------------------ 135 %package s 136 #------------------------------------------------------------------------------ 137 Summary: applications for Qt 150 138 Group: Documentation 151 139 152 Requires: %{ qt_}-pm = %{version}-%{release}153 154 Provides: %{qtM}- demos = %{version}-%{release}155 156 %description demos140 Requires: %{}-pm = %{version}-%{release} 141 142 Provides: %{qtM}-s = %{version}-%{release} 143 144 %description s 157 145 %{descr_brief} 158 146 … … 161 149 Qt toolkit. 162 150 163 %files demos151 %files s 164 152 %defattr(-,root,root,-) 165 153 %{qt_bindir}/qtdemo.exe 166 154 # @todo put shortcuts to /usr/bin 167 155 #%if "%{qt_bindir}" != "%{_bindir}" 168 #%{_bindir}/qtdemo.exe copied from launcher.exe169 156 #%endif 170 %{qt_demosdir}/ 171 172 %post demos 173 174 %wps_object_create_begin -n %{name}-demos 157 #%dir %{qt_examplesdir}/ 158 #%dir %{qt_demosdir}/ 159 160 %post examples 161 162 %wps_object_create_begin -n %{name}-examples 175 163 %pkg_wps_folder_create% 176 164 %{pkg_wps_base}_DEMO:WPProgram|Examples and Demos|<QT4_FOLDER>|EXENAME=((%{qt_bindir}/qtdemo.exe)) … … 178 166 %wps_object_create_end 179 167 180 %postun demos181 %wps_object_delete_all -n %{name}- demos168 %postun s 169 %wps_object_delete_all -n %{name}-s 182 170 183 171 #------------------------------------------------------------------------------ … … 187 175 Group: Development/Tools 188 176 189 Requires: %{ qt_}-pm = %{version}-%{release}177 Requires: %{}-pm = %{version}-%{release} 190 178 191 179 Provides: %{qtM}-linguist = %{version}-%{release} … … 216 204 Group: Development/Tools 217 205 218 Requires: %{ qt_}-pm = %{version}-%{release}206 Requires: %{}-pm = %{version}-%{release} 219 207 220 208 Provides: %{qtM}-assistant = %{version}-%{release} … … 229 217 %defattr(-,root,root,-) 230 218 %{qt_bindir}/assistant.exe 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 231 259 232 260 #------------------------------------------------------------------------------ … … 237 265 BuildArch: noarch 238 266 239 Requires: %{ qt_}-assistant = %{version}-%{release}267 Requires: %{}-assistant = %{version}-%{release} 240 268 241 269 Provides: %{qtM}-doc = %{version}-%{release} … … 259 287 Group: Development/Libraries 260 288 261 Requires: %{qt_}-pm = %{version}-%{release} 262 263 Provides: %{qt_}-designer = %{version}-%{release} 289 Requires: %{name}-pm = %{version}-%{release} 264 290 265 291 Provides: %{qtM}-devel = %{version}-%{release} 266 Provides: %{qtM}-designer = %{version}-%{release}267 292 268 293 %description devel … … 270 295 271 296 This package contains the headers, libraries and tools necessary to develop 272 applications using the Qt toolkit. Includes the Qt Designer tool.297 applications using the Qt toolkit. 273 298 274 299 %files devel 275 300 %defattr(-,root,root,-) 276 %{qt_bindir}/designer.exe 301 %{qt_bindir}/moc.exe 302 303 #------------------------------------------------------------------------------ 304 %package devel-all 305 #------------------------------------------------------------------------------ 306 Summary: Qt development kit 307 Group: Development/Libraries 308 309 Requires: %{name}-examples = %{version}-%{release} 310 Requires: %{name}-linguist = %{version}-%{release} 311 Requires: %{name}-assistant = %{version}-%{release} 312 Requires: %{name}-designer = %{version}-%{release} 313 Requires: %{name}-devel-tools = %{version}-%{release} 314 Requires: %{name}-doc = %{version}-%{release} 315 316 Provides: %{qtM}-devel-all = %{version}-%{release} 317 318 %description devel-all 319 %{descr_brief} 320 321 This meta package installs all individual packages containing various Qt 322 development components, including the Qt headers and libraries, the Linguist, 323 Assistant and designer Designer applications, development tools, example 324 Qt applications and the API documentation. 277 325 278 326 #------------------------------------------------------------------------------ … … 280 328 #------------------------------------------------------------------------------ 281 329 330 331 282 332 %if "%{?QT_SOURCE_TREE}" != "" 283 %setup -n "%{qt_}-%{version}-%{release}" -Tc 333 %if !0%{?skip_prep_export} 334 # get clean source tree from SVN 335 %setup -n "%{name}-%{version}" -Tc 336 svn export -r %{svn_revision} %{QT_SOURCE_TREE} . 284 337 %else 285 %setup -n "%{qt_}-%{version}-%{release}" -q 286 %endif 338 # use passed source tree as is (shadow build) 339 %setup -n "%{name}-%{version}" -TDc 340 %endif 341 %else 342 # use source zip 343 %setup -q 344 %endif 345 346 %endif # if !0%{?skip_prep} 287 347 288 348 #------------------------------------------------------------------------------ … … 290 350 #------------------------------------------------------------------------------ 291 351 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 352 %if !0%{?skip_build} 300 353 301 354 die() { echo "ERROR: $@"; exit 1; } 302 355 check_var() { eval "[ -n \"\$$1\" ] || die \"$1 variable is not set.\""; } 303 356 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 357 # Qt source tree (DOS format) 309 358 QT_SOURCE_TREE_D=$(echo "%{QT_SOURCE_TREE}" | tr '/' '\\') 310 359 311 360 # Sanity checks (laking these would turn off features that must be ON) 312 check_var "CUPS_INCLUDEPATHH" 313 check_var "OPENSSL_INCLUDEPATH" 361 check_var "CUPS_INCLUDEPATH" 314 362 check_var "MYSQL_INCLUDEPATH" 315 363 check_var "MYSQL_LIBS" 316 364 check_var "PSQL_INCLUDEPATH" 317 365 check_var "PSQL_LIBS" 366 367 368 318 369 319 370 # CMD.EXE is required by the build process for now … … 339 390 cmd /c $QT_SOURCE_TREE_D\\configure.cmd $library_paths 340 391 341 make -j%MAKE_JOBS% 342 make docs -j%MAKE_JOBS% 392 make -j$MAKE_JOBS 393 394 %if !0%{?skip_build_docs} 395 make docs -j$MAKE_JOBS 396 %endif 397 398 %endif # if !0%{?skip_build} 343 399 344 400 #------------------------------------------------------------------------------ … … 346 402 #------------------------------------------------------------------------------ 347 403 404 405 348 406 rm -rf %{buildroot} 349 407 350 408 make install INSTALL_ROOT=%{buildroot} 351 409 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}/ 410 # copy READMEs (make install doesn't do that) 411 cp %{QT_SOURCE_TREE}/LICENSE.* \ 412 %{QT_SOURCE_TREE}/LGPL_EXCEPTION.txt \ 413 %{QT_SOURCE_TREE}/README \ 414 %{QT_SOURCE_TREE}/changes-%{ver_major}.%{ver_minor}.%{ver_} \ 415 %{QT_SOURCE_TREE}/README.OS2 \ 416 %{QT_SOURCE_TREE}/CHANGES.OS2 \ 417 %{pkg_docdir}/ 418 419 %endif # if !0%{?skip_install} 367 420 368 421 #------------------------------------------------------------------------------ … … 370 423 #------------------------------------------------------------------------------ 371 424 372 rm -rf %{buildroot}425 rm -rf %{buildroot} 373 426 374 427 #------------------------------------------------------------------------------ 375 428 %changelog 376 377 * Sun Oct 31 2010 Dmitry A. Kuminov <coding/dmik.org> - 4.6.3-1378 - test version
Note:
See TracChangeset
for help on using the changeset viewer.