Changeset 21680 for trunk/tools/install
- Timestamp:
- Sep 30, 2011, 6:03:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/install/odin.spec
r21678 r21680 2 2 # http://svn.netlabs.org/odin32 3 3 # 4 5 %define test_build 1 4 %define test_mode 1 6 5 7 6 %define ver_major 0 … … 11 10 %define rpm_release 1 12 11 13 %define pkg_name odin 12 Name: odin 13 Vendor: netlabs.org 14 License: Project Odin Software License 15 Url: http://svn.netlabs.org/odin32/ 16 17 Version: %{ver_major}.%{ver_minor}.%{ver_patch} 18 Release: %{rpm_release} 19 20 Source: %{name}-%{version}.zip 14 21 15 22 %define descr_brief Odin is a set of libraries that provide a Win32-compatible runtime environment.\ … … 17 24 native OS/2 applications built from Win32 sources using Odin SDK. 18 25 26 %define pkg_docdir %{_docdir}/%{name} 27 19 28 %define pkg_wps_base ODIN 20 29 %define pkg_wps_folder_id <%{pkg_wps_base}_FOLDER> 21 30 %define pkg_wps_folder_create %{pkg_wps_base}_FOLDER:WPFolder|Odin|<WP_DESKTOP> 22 %define pkg_wps_reader() EXENAME=e.exe;PROGTYPE=PROG_PM;PARAMETERS=((%*)) 23 24 %define pkg_name_ver %{pkg_name}-%{ver_major}.%{ver_minor}.%{ver_patch} 31 %define pkg_wps_view_txt() EXENAME=e.exe;PROGTYPE=PROG_PM;PARAMETERS=((%*)) 32 %define pkg_wps_view_inf() EXENAME=view.exe;PROGTYPE=PROG_PM;PARAMETERS=((%*)) 33 34 #------------------------------------------------------------------------------ 35 # commons 36 #------------------------------------------------------------------------------ 37 38 # installation paths 39 %define odin_libdir %{_libdir} 40 %define odin_bindir %{_bindir} 41 %define odin_systemdir %{odin_libdir} 42 %define odin_windowsdir %{_var}/lib/odin 43 44 # disable lxlite compression (this causes problems for some DLLs) 45 %define __os_install_post %{nil} 25 46 26 47 #------------------------------------------------------------------------------ … … 28 49 #------------------------------------------------------------------------------ 29 50 30 Name: %{pkg_name} 51 Summary: Odin (dummy) 52 Group: System Environment/Libraries 53 54 %description 55 %{descr_brief} 56 57 This package is not actually generated (due to the missing %files section). 58 It is present only because RPM requires Summary: and %description sections for 59 the main package to exist. 60 61 #------------------------------------------------------------------------------ 62 %package -n lib%{name} 63 #------------------------------------------------------------------------------ 64 31 65 Summary: Odin runtime 32 66 Group: System Environment/Libraries 33 Version: %{ver_major}.%{ver_minor}.%{ver_patch} 34 Release: %{rpm_release} 35 Vendor: netlabs.org 36 37 # @todo? 38 #Requires: libc >= 0.6.3 39 40 License: Project Odin Software License 41 Url: http://svn.netlabs.org/odin32/ 42 43 Source: odin.zip 44 45 #BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root 46 47 # @todo 48 #BuildRequires: 49 50 %description 51 %{descr_brief} 52 53 This package contains Odin runtime libraries and utilities. 54 55 %files 56 %defattr(-,root,root,-) 57 %doc %{_docdir}/%{pkg_name_ver}/Readme.txt 58 #%{_libdir}/wgss50.dll 59 #%{_libdir}/odincrt.dll 60 #%{_libdir}/ntdll.dll 61 #%{_libdir}/kernel32.dll 62 63 %pre 64 /*.cmd*/ 65 66 packages.1 = 'Odin\Odin\Odin Core Files' 67 packages.2 = 'Odin\Odin\Odin System Files' 68 packages.3 = 'Odin\Odin\Odin .sym files' 69 packages.4 = 'Odin\Odin\Changes to Config.sys' 70 packages.0 = 4 71 72 ver = '' 73 do i = 1 to packages.0 74 ver = GetPkgVersion(packages.i) 75 if (ver \== '') then leave 76 end 77 if (ver == '') then exit 0 78 79 say; say 'ERROR:'; say 80 say 'You have a WPI package "'packages.i'" version 'ver 81 say 'installed on your system.'; say 82 say 'You cannot have both the WPI and RPM package installed at the same time.' 83 say 'Please de-install the specified WPI package using the WarpIn utility' 84 say 'and try again.'; say 85 exit 1 86 87 GetPkgVersion: procedure 88 parse arg aPkgId 89 rc = rxFuncAdd('SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs') 90 rc = SysLoadFuncs() 91 WarpInDir = strip(SysIni('USER', 'WarpIN', 'Path'), 'T', '0'x) 92 if (WarpInDir \== '') then do 93 rc = SysFileTree(WarpInDir'\DATBAS_?.INI', 'inis', 'FO') 94 if (rc == 0) then do 95 do i = 1 to inis.0 96 rc = SysIni(inis.i, 'ALL:', 'apps') 97 if (rc == '') then do 98 do j = 1 to apps.0 99 apps.j = strip(apps.j, 'T', '0'x) 100 if (left(apps.j, length(aPkgId)) == aPkgId) then do 101 /* found the app */ 102 ver = right(apps.j, length(apps.j) - length(aPkgId) - 1) 103 ver = translate(ver, '.', '\') 104 return ver 105 end 106 end 107 end 108 else do 109 say; say 'ERROR:'; say 110 say 'Failed to access the file "'inis.i'".'; say 111 say 'Please close the WarpIn application or, if it is not running, make sure' 112 say 'that this file is not locked by another process and try again.'; say 113 exit 5 114 end 115 end 116 end 117 end 118 return '' 119 120 %post 121 %wps_object_create_begin 122 %{pkg_wps_folder_create} 123 %{pkg_wps_base}_README:WPProgram|Read Me|%{pkg_wps_folder_id}|%{pkg_wps_reader %{_docdir}/%{pkg_name_ver}/Readme.txt} 124 %wps_object_create_end 125 126 %postun 127 %wps_object_delete_all 67 68 %description -n lib%{name} 69 %{descr_brief} 70 71 This package contains core Odin runtime libraries. 72 73 %files -n lib%{name} 74 %defattr(-,root,root,-) 75 %doc %{pkg_docdir}/ 76 %exclude %{pkg_docdir}/odinuser.inf 77 %if "%{odin_libdir}" != "%{_libdir}" 78 %dir %{odin_libdir}/ 79 %endif 80 %if "%{odin_bindir}" != "%{_bindir}" 81 %{odin_bindir}/ 82 %else 83 %{odin_bindir}/*.exe 84 %endif 85 %exclude %{odin_bindir}/pe.exe 86 %exclude %{odin_bindir}/pec.exe 87 %exclude %{odin_bindir}/xx2lx.exe 88 %if "%{odin_systemdir}" != "%{odin_libdir}" 89 %{odin_systemdir}/ 90 %else 91 %{odin_systemdir}/* 92 %endif 93 %exclude %{odin_systemdir}/capi2032.dll 94 %exclude %{odin_systemdir}/secur32.dll 95 %exclude %{odin_systemdir}/schannel.dll 96 %exclude %{odin_systemdir}/win32k.sys 97 %exclude %{odin_systemdir}/win32kCC.exe 98 %exclude %{odin_systemdir}/kRx.exe 99 # files/directories generated by odininst.exe removed on uninstall 100 %attr(0755,root,root) %ghost %{odin_systemdir}/Drivers/ 101 %attr(0755,root,root) %ghost %{odin_systemdir}/Drivers/etc/ 102 %attr(0644,root,root) %ghost %{odin_systemdir}/ODIN.INI 103 # files/directories generated by odininst.exe preserved on uninstall 104 %attr(0755,root,root) %ghost %config %{odin_windowsdir}/ 105 106 %pre -n lib%{name} 107 %warpin_conflicts_begin 108 Odin\Odin\Odin Core Files 109 Odin\Odin\Odin System Files 110 Odin\Odin\Odin .sym files 111 Odin\Odin\Changes to Config.sys 112 %warpin_conflicts_end 113 114 %post -n lib%{name} 115 116 CFGSYS_CHANGED= 117 %if "%{odin_systemdir}" != "%{_libdir}" 118 export ODIN_SYSTEMDIR_D="$(echo %{odin_systemdir} | sed -re 's,/@unixroot,'$UNIXROOT',g' -e 's,/,\\,g')" 119 %cube {ADDSTRING ";%ODIN_SYSTEMDIR_D%" IN "LIBPATH=" (FIRST AFTER} %{os2_config_sys} >nul 120 CFGSYS_CHANGED=y 121 %endif 122 %if "%{odin_bindir}" != "%{_bindir}" 123 export ODIN_BINDIR_D="$(echo %{odin_bindir} | sed -re 's,/@unixroot,'$UNIXROOT',g' -e 's,/,\\,g')" 124 %cube {ADDSTRING ";%ODIN_BINDIR_D%" IN "SET PATH=" (FIRST AFTER} %{os2_config_sys} >nul 125 %endif 126 if [ -n "$CFGSYS_CHANGED" ]; then 127 echo; echo "NOTE:" 128 echo; echo "The file '%{os2_config_sys}' has been changed. You need to reboot your" 129 echo "computer in order to activate these changes." 130 echo 131 fi 132 133 #initialize system directories, registry and INI files 134 ODIN_WINDOWSDIR_D=$(echo "%{odin_windowsdir}" | sed -re 's,/@unixroot,'$UNIXROOT',g' -e 's,/,\\,g') 135 echo \ 136 "[DEVDIRECTORIES] 137 WINDOWS=$ODIN_WINDOWSDIR_D 138 " \ 139 > "%{odin_systemdir}/ODIN.INI" 140 # mkdir -p fails on /@unixroot, replace it with the real value 141 mkdir -p "$(echo %{odin_windowsdir} | sed -re 's,/@unixroot,'$UNIXROOT',g')" 142 (cd "%{odin_systemdir}/"; "%{odin_systemdir}"/odininst.exe) 143 144 %postun -n lib%{name} 145 146 CFGSYS_CHANGED= 147 %if "%{odin_bindir}" != "%{_bindir}" 148 export ODIN_BINDIR_D="$(echo %{odin_bindir} | sed -re 's,/@unixroot,'$UNIXROOT',g' -e 's,/,\\,g')" 149 %cube {DELSTRING ";%ODIN_BINDIR_D%" IN "SET PATH=" (FIRST} %{os2_config_sys} >nul 150 CFGSYS_CHANGED=y 151 %endif 152 %if "%{odin_systemdir}" != "%{_libdir}" 153 export ODIN_SYSTEMDIR_D="$(echo %{odin_systemdir} | sed -re 's,/@unixroot,'$UNIXROOT',g' -e 's,/,\\,g')" 154 %cube {DELSTRING ";%ODIN_SYSTEMDIR_D%" IN "LIBPATH=" (FIRST} %{os2_config_sys} >nul 155 %endif 156 if [ -n "$CFGSYS_CHANGED" ]; then 157 echo; echo "NOTE:" 158 echo; echo "The file '%{os2_config_sys}' has been changed. You need to reboot your" 159 echo "computer in order to activate these changes." 160 echo 161 fi 162 163 #------------------------------------------------------------------------------ 164 %package -n lib%{name}-capi20 165 #------------------------------------------------------------------------------ 166 167 Summary: Odin CAPI 2.0 library 168 Group: System Environment/Libraries 169 170 Requires: lib%{name} = %{version}-%{release} 171 172 %description -n lib%{name}-capi20 173 %{descr_brief} 174 175 This package contains the Common ISDN Application Programming Interface (CAPI) 176 runtime library needed for applications working with ISDN devices. 177 178 Note that this library requires a native OS/2 CAPI library to be installed (it 179 is usually supplied with the ISDN device drivers). You may use a virtual package 180 libcapi20-dummy to satisfy this requirement if you have installed the necessary 181 CAPI DLLs manually. 182 183 %files -n lib%{name}-capi20 184 %defattr(-,root,root,-) 185 %{odin_systemdir}/capi2032.dll 186 187 #------------------------------------------------------------------------------ 188 %package -n lib%{name}-security 189 #------------------------------------------------------------------------------ 190 191 Summary: Odin security library 192 Group: System Environment/Libraries 193 194 Requires: lib%{name} = %{version}-%{release} 195 196 %description -n lib%{name}-security 197 %{descr_brief} 198 199 This package contains the Windows Secure Service Provider Interface (SSPI) 200 runtime library needed for applications using this interface. 201 202 Note that this library requires a native OS/2 NETAPI library to be installed 203 (which is part of the IBM Peer component or the IBM HPFS386 package). You may 204 use a virtual package libnetapi-dummy to satisfy this requirement if you have 205 installed the necessary NETAPI DLLs manually. 206 207 %files -n lib%{name}-security 208 %defattr(-,root,root,-) 209 %{odin_systemdir}/secur32.dll 210 211 #------------------------------------------------------------------------------ 212 %package exe-tools 213 #------------------------------------------------------------------------------ 214 215 Summary: Odin EXE tools 216 Group: System Environment/Tools 217 218 Requires: lib%{name} = %{version}-%{release} 219 220 %description exe-tools 221 %{descr_brief} 222 223 This package contains command line tools used to convert Windows executables 224 to OS/2 executables so that they can be run on OS/2 in the Odin environment. 225 226 Note that these tools are NOT CURRENTLY SUPPORTED and therefore not recommended 227 for general use. They are only provided for testing purposes. 228 229 %files exe-tools 230 %defattr(-,root,root,-) 231 %{odin_bindir}/pe.exe 232 %{odin_bindir}/pec.exe 233 %{odin_bindir}/xx2lx.exe 128 234 129 235 #------------------------------------------------------------------------------ … … 134 240 Group: System Environment/Libraries 135 241 136 Requires: %{pkg_name} = %{version}-%{release}242 Requires: lib%{name} = %{version}-%{release} 137 243 138 244 %description win32k … … 148 254 %files win32k 149 255 %defattr(-,root,root,-) 150 %{_libdir}/win32k.sys 256 %{odin_systemdir}/win32k.sys 257 %{odin_systemdir}/win32kCC.exe 258 %{odin_systemdir}/kRx.exe 151 259 152 260 %post win32k 153 %cube {ADDLINE "DEVICE=%UNIXROOT%\usr\%{_lib}\win32k.sys" (AFTER "DEVICE="} %{os2_config_sys} %{os2_config_sys}.yum >nul 261 export ODIN_SYSTEMDIR_D="$(echo %{odin_systemdir} | sed -re 's,/@unixroot,'$UNIXROOT',g' -e 's,/,\\,g')" 262 %cube {ADDLINE "DEVICE=%ODIN_SYSTEMDIR_D%\win32k.sys" (AFTER "DEVICE="} %{os2_config_sys} >nul 154 263 echo; echo "NOTE:" 155 264 echo; echo "The file '%{os2_config_sys}' has been changed. You need to reboot your" … … 158 267 159 268 %postun win32k 160 %cube {DELLINE "DEVICE=%UNIXROOT%\usr\%{_lib}\win32k.sys"} %{os2_config_sys} %{os2_config_sys}.yum >nul 269 export ODIN_SYSTEMDIR_D="$(echo %{odin_systemdir} | sed -re 's,/@unixroot,'$UNIXROOT',g' -e 's,/,\\,g')" 270 %cube {DELLINE "DEVICE=%ODIN_SYSTEMDIR_D%\win32k.sys"} %{os2_config_sys} >nul 161 271 echo; echo "NOTE:" 162 272 echo; echo "The file '%{os2_config_sys}' has been changed. You need to reboot your" … … 165 275 166 276 #------------------------------------------------------------------------------ 277 %package doc 278 #------------------------------------------------------------------------------ 279 280 Summary: Odin documentation 281 Group: Documentation 282 BuildArch: noarch 283 284 Requires: lib%{name} = %{version}-%{release} 285 286 %description doc 287 %{descr_brief} 288 289 This package contains Odin user's manual. 290 291 %files doc 292 %defattr(-,root,root,-) 293 %doc %{pkg_docdir}/odinuser.inf 294 295 %post doc 296 %wps_object_create_begin -n %{name}-doc 297 %{pkg_wps_folder_create} 298 %{pkg_wps_base}_README:WPProgram|Read Me|%{pkg_wps_folder_id}|%{pkg_wps_view_txt %{pkg_docdir}/Readme.txt} 299 %{pkg_wps_base}_CHANGELOG:WPProgram|ChangeLog|%{pkg_wps_folder_id}|%{pkg_wps_view_txt %{pkg_docdir}/ChangeLog} 300 %{pkg_wps_base}_LICENSE:WPProgram|License|%{pkg_wps_folder_id}|%{pkg_wps_view_txt %{pkg_docdir}/LICENSE.TXT} 301 %{pkg_wps_base}_WGSS50_LICENSE:WPProgram|WGSS50 License|%{pkg_wps_folder_id}|%{pkg_wps_view_txt %{pkg_docdir}/WGSS50.lic} 302 %{pkg_wps_base}_MANUAL:WPProgram|User's Manual|%{pkg_wps_folder_id}|%{pkg_wps_view_inf %{pkg_docdir}/odinuser.inf} 303 %wps_object_create_end 304 305 %postun doc 306 %wps_object_delete_all -n %{name}-doc 307 308 #------------------------------------------------------------------------------ 167 309 %prep 168 310 #------------------------------------------------------------------------------ 169 311 170 %if 0%{?test_ build}312 %if 0%{?test_mode} 171 313 %setup -TD 172 314 %else … … 185 327 rm -rf %{buildroot} 186 328 187 mkdir -p %{buildroot}%{_libdir} 188 #cp system32/wgss50.dll %{buildroot}%{_libdir}/ 189 #cp system32/odincrt.dll %{buildroot}%{_libdir}/ 190 #cp system32/ntdll.dll %{buildroot}%{_libdir}/ 191 #cp system32/kernel32.dll %{buildroot}%{_libdir}/ 192 cp system32/win32k.sys %{buildroot}%{_libdir}/ 193 mkdir -p %{buildroot}%{_docdir}/%{pkg_name_ver} 194 cp Readme.txt %{buildroot}%{_docdir}/%{pkg_name_ver}/ 329 mkdir -p %{buildroot}%{pkg_docdir} 330 cp *.txt %{buildroot}%{pkg_docdir}/ 331 cp LICENSE.TXT %{buildroot}%{pkg_docdir}/ 332 cp ChangeLog %{buildroot}%{pkg_docdir}/ 333 cp WGSS50.lic %{buildroot}%{pkg_docdir}/ 334 cp odinuser.inf %{buildroot}%{pkg_docdir}/ 335 336 mkdir -p %{buildroot}%{odin_windowsdir}/ 337 338 mkdir -p %{buildroot}%{odin_systemdir}/ 339 cp -dp system32/*.dll %{buildroot}%{odin_systemdir}/ 340 cp -dp system32/*.exe %{buildroot}%{odin_systemdir}/ 341 cp -dp system32/win32k.sys %{buildroot}%{odin_systemdir}/ 342 343 mkdir -p %{buildroot}%{odin_bindir}/ 344 cp system32/*.exe %{buildroot}%{odin_bindir}/ 345 346 # these are internal tools that should not be in PATH 347 mv %{buildroot}%{odin_bindir}/odininst.exe %{buildroot}%{odin_systemdir}/ 348 mv %{buildroot}%{odin_bindir}/win32kCC.exe %{buildroot}%{odin_systemdir}/ 349 mv %{buildroot}%{odin_bindir}/kRx.exe %{buildroot}%{odin_systemdir}/ 195 350 196 351 #------------------------------------------------------------------------------ … … 198 353 #------------------------------------------------------------------------------ 199 354 355 %if !0%{?test_mode} 200 356 rm -rf %{buildroot} 357 %endif 201 358 202 359 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.