Changeset 1068
- Timestamp:
- Sep 9, 2011, 2:52:48 AM (14 years ago)
- Location:
- packaging
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
packaging/CreateRPMs.sh
r1061 r1068 11 11 # Defaults 12 12 # 13 14 qt_spec=qt.spec 13 15 14 16 # … … 25 27 } 26 28 27 cmd_ create()29 cmd_all() 28 30 { 29 31 local src_base="$1" … … 31 33 [ -d "$src_base" ] || die "'$src_base' is not a directory." 32 34 33 run cmd /c env.cmd rpmbuild -D "QT_SOURCE_TREE $src_base" -bc qt.spec 35 run $env_cmd rpmbuild \ 36 -D "QT_SOURCE_TREE $src_base" \ 37 -ba $qt_spec 38 } 39 40 cmd_build() 41 { 42 local src_base="$1" 43 44 [ -d "$src_base" ] || die "'$src_base' is not a directory." 45 46 run $env_cmd rpmbuild \ 47 -D "QT_SOURCE_TREE $src_base" -D "skip_prep_export 1" \ 48 -bc $qt_spec 49 } 50 51 cmd_rpm() 52 { 53 local inst_base="$1" 54 55 [ -d "$inst_base" ] || die "'$inst_base' is not a directory." 56 57 run $env_cmd rpmbuild \ 58 -D "QT_BUILD_TREE $inst_base" \ 59 --short-circuit -bi $qt_spec 34 60 } 35 61 … … 44 70 start_dir=$(pwd) 45 71 72 [ -f "$start_dir/env.sh" ] && . "$start_dir/env.sh" 73 74 env_cmd= 75 [ -f "$start_dir/env.cmd" ] && env_cmd="cmd /c env.cmd" 76 46 77 # Parse arguments 47 78 … … 51 82 " 52 83 Usage: 53 $script_name test [options] ... 84 $script_name all <srcdir> Do everything (RPM, SRPM, ZIP) 85 $script_name build <srcdir> Build product (shadow build) 86 $script_name rpm [<instdir>] Build RPMs only 54 87 55 88 Options: 56 <srcdir> (*) Qt SVN source tree location 89 <srcdir> Qt SVN source tree location 90 <instdir> Qt installation tree location 91 (default: $HOME/rpmbuild/BUILDROOT/qt-X.Y.Z) 57 92 " 58 93 } 59 94 60 95 case "$1" in 61 test)96 all|build) 62 97 if [ -n "$2" ]; then 63 cmd_ create$(echo "$2" | tr '\\' '/')98 cmd_$1 $(echo "$2" | tr '\\' '/') 64 99 else 65 100 cmd_help 101 fi;; 102 rpm) 103 if [ -n "$2" ]; then 104 cmd_rpm $(echo "$2" | tr '\\' '/') 105 else 106 cmd_rpm 66 107 fi;; 67 108 -h|-?|--help|*) cmd_help;; -
packaging/env.tpl.cmd
r1061 r1068 14 14 'set BEGINLIBPATH=%UNIXROOT%\usr\lib;%BEGINLIBPATH%' 15 15 16 /* Qt links to some OS/2 DLLs directly (w/o import libs) */17 'set LIBRARY_PATH=C:\OS2\DLL;C:\MPTN\DLL;%LIBRARY_PATH%'18 19 16 /* CUPS libraries */ 20 17 'set CUPS_ROOT=C:\cups' … … 22 19 'set CUPS_LIBS=' 23 20 24 /* OpenSSL libraries */25 'set OPENSSL_ROOT=D:\Coding\openssl\openssl-1.0.0a-os2knix-20100706'26 'set OPENSSL_INCLUDEPATH=%OPENSSL_ROOT%\include'27 'set OPENSSL_LIBS='28 'set BEGINLIBPATH=%OPENSSL_ROOT%\dll;%BEGINLIBPATH%'29 30 21 /* MySQL libraries */ 31 22 'set MYSQL_ROOT=D:\Coding\mysql\mysql51' 32 23 'set MYSQL_INCLUDEPATH=%MYSQL_ROOT%\include' 33 'set MYSQL_LIBS=-L%MYSQL_ROOT%\lib -lmysqlclient_r - L%OPENSSL_ROOT%\lib -llibssl -llibcrypto -LD:\Dev\lib-lpthread'24 'set MYSQL_LIBS=-L%MYSQL_ROOT%\lib -lmysqlclient_r -llibssl -llibcrypto -lpthread' 34 25 35 26 /* PostgresSQL libraries */ 36 27 'set PSQL_ROOT=D:\Coding\pgsql\pgsql901' 37 28 'set PSQL_INCLUDEPATH=%PSQL_ROOT%\include' 38 'set PSQL_LIBS=-L%PSQL_ROOT%\lib -llibpq - L%OPENSSL_ROOT%\lib -llibssl -llibcrypto -LD:\Dev\lib-lpthread'29 'set PSQL_LIBS=-L%PSQL_ROOT%\lib -llibpq -llibssl -llibcrypto -lpthread' 39 30 40 31 /* Number of make jobs, normally # of CPUs + 1 */ … … 44 35 if (strip(args) \== '') then 45 36 'cmd /c' args 46 else47 'rpmbuild -D "ttt" -bc qt.spec'48 49 37 exit rc -
packaging/qt.spec
r1062 r1068 2 2 # http://svn.netlabs.org/qt4 3 3 # 4 # If you are a packager, please read HowToDistribute.txt for general 5 # instructions. 6 # 7 8 Name: qt 9 Vendor: netlabs.org 10 License: LGPLv2 with exceptions or GPLv3 with exceptions 11 Url: http://www.qtsoftware.com/ 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 %define os2_release 0 18 9 19 %define rpm_release 1 10 20 11 %define svn_revision 021 %define svn_revision 1070 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 %define qtM %{name}%{ver_major} 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: %{name} = %{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 %{qt_libdir}/QtGui%{ver_major}.dll 133 134 #------------------------------------------------------------------------------ 135 %package examples 136 #------------------------------------------------------------------------------ 137 Summary: Example 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: %{name}-pm = %{version}-%{release} 141 142 Provides: %{qtM}-examples = %{version}-%{release} 143 144 %description examples 157 145 %{descr_brief} 158 146 … … 161 149 Qt toolkit. 162 150 163 %files demos151 %files examples 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 examples 169 %wps_object_delete_all -n %{name}-examples 182 170 183 171 #------------------------------------------------------------------------------ … … 187 175 Group: Development/Tools 188 176 189 Requires: %{ qt_}-pm = %{version}-%{release}177 Requires: %{name}-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: %{name}-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 %package designer 222 #------------------------------------------------------------------------------ 223 Summary: Qt Designer tool 224 Group: Development/Tools 225 226 Requires: %{name}-pm = %{version}-%{release} 227 228 Provides: %{qtM}-designer = %{version}-%{release} 229 230 %description designer 231 %{descr_brief} 232 233 This package contains the Qt Designer tool used to for designing and building 234 graphical user interfaces from Qt components. 235 236 %files designer 237 %defattr(-,root,root,-) 238 %{qt_bindir}/designer.exe 239 240 #------------------------------------------------------------------------------ 241 %package devel-tools 242 #------------------------------------------------------------------------------ 243 Summary: Qt development tools 244 Group: Development/Tools 245 246 Requires: %{name}-pm = %{version}-%{release} 247 248 Provides: %{qtM}-devel-tools = %{version}-%{release} 249 250 %description devel-tools 251 %{descr_brief} 252 253 This package contains tools used to assist in Qt development, including 254 PixelTool, QML Viewer, Help Converter and other applications. 255 256 %files devel-tools 257 %defattr(-,root,root,-) 258 %{qt_bindir}/pixeltool.exe 231 259 232 260 #------------------------------------------------------------------------------ … … 237 265 BuildArch: noarch 238 266 239 Requires: %{ qt_}-assistant = %{version}-%{release}267 Requires: %{name}-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 %if !0%{?skip_prep} 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 # Qt links to some OS/2 DLLs directly (w/o import libs) 368 export LIBRARY_PATH=%{os2_boot_drive}/OS2/DLL\;%{os2_boot_drive}/MPTN/DLL\;$LIBRARY_PATH 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 %if !0%{?skip_install} 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.