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