| 1 | Summary: Wrap REXX scrips into OS/2 PM or VIO executables
|
|---|
| 2 | Name: rexx_exe
|
|---|
| 3 | Epoch: 1
|
|---|
| 4 | Version: 1.0.0
|
|---|
| 5 | Release: 2%{?dist}
|
|---|
| 6 | License: None
|
|---|
| 7 | Group: System Environment/Shells
|
|---|
| 8 | Vendor: bww bitwise works GmbH
|
|---|
| 9 |
|
|---|
| 10 | %scm_source github https://github.com/bitwiseworks/rexx_exe 0c61199a23285f592eda44f9f9c66a54d05f40c7
|
|---|
| 11 |
|
|---|
| 12 | Requires: os2tk45-rc
|
|---|
| 13 | BuildRequires: os2tk45-rc
|
|---|
| 14 |
|
|---|
| 15 | %description
|
|---|
| 16 | This package has two programs to wrap a rexx program in either a VIO
|
|---|
| 17 | (commandline) or PM (presentation manager) executable. You probably know
|
|---|
| 18 | some other rexx -> exe converters like VXRexx, Vispro, REXX2EXE,...
|
|---|
| 19 | Features of this implementation:
|
|---|
| 20 | - build from assembler source: small size - comes close or is below
|
|---|
| 21 | the size of the wrapped rexx, less processing overhead and memory usage
|
|---|
| 22 | - turns the rexx scripts into plain executable resources - no need to
|
|---|
| 23 | compress the resources since the OS build in page compression can be
|
|---|
| 24 | used. Use LxLite to squeeze the last byte from the executable..
|
|---|
| 25 | I also see no need to encrypt a rexx script. Since there is nothing
|
|---|
| 26 | 'compiled' or tokenized, the rexx program should be portable between
|
|---|
| 27 | different OS/2 rexx interpreter versions and lines.
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 | %prep
|
|---|
| 31 | %scm_setup
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 | %build
|
|---|
| 35 | # Tailor converter scripts to search for helper in usr/lib/%{name}
|
|---|
| 36 | for f in exe/rexx2vio.cmd exe/rexx2pm.cmd ; do
|
|---|
| 37 | # Due to bug in sed 4.2.1-2 -i kills CRLF in processed files, so use redirection
|
|---|
| 38 | %{__sed} \
|
|---|
| 39 | -e '/^Parse Source .*$/ d' \
|
|---|
| 40 | -e 's|^helper = .*$|helper = value('UNIXROOT',,'OS2ENVIRONMENT')"\\usr\\lib\\%{name}\\rexx2xx.exe"|' \
|
|---|
| 41 | -e 's|@call|@|g' "$f" > "$f.new"
|
|---|
| 42 | %{__rm} "$f"
|
|---|
| 43 | %{__mv} "$f.new" "$f"
|
|---|
| 44 | done
|
|---|
| 45 | # Convert all scripts to VIO EXE
|
|---|
| 46 | for f in exe/*.cmd ; do
|
|---|
| 47 | exe/rexx2xx.cmd vio "$f"
|
|---|
| 48 | done
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 | %install
|
|---|
| 52 | %{__rm} -rf %{buildroot}
|
|---|
| 53 | %{__mkdir_p} %{buildroot}%{_bindir}
|
|---|
| 54 | %{__cp} -p exe/rexx2pm.exe %{buildroot}%{_bindir}
|
|---|
| 55 | %{__cp} -p exe/rexx2vio.exe %{buildroot}%{_bindir}
|
|---|
| 56 | %{__mkdir_p} %{buildroot}%{_libdir}/%{name}
|
|---|
| 57 | %{__cp} -p exe/rexx_pm.exe %{buildroot}%{_libdir}/%{name}
|
|---|
| 58 | %{__cp} -p exe/rexx_vio.exe %{buildroot}%{_libdir}/%{name}
|
|---|
| 59 | %{__cp} -p exe/rexx2xx.exe %{buildroot}%{_libdir}/%{name}
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 | %clean
|
|---|
| 63 | %{__rm} -rf %{buildroot}
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 | %files
|
|---|
| 67 | %{_bindir}/*.exe
|
|---|
| 68 | %{_libdir}/%{name}/*.exe
|
|---|
| 69 | %doc doc/rexx_exe.txt
|
|---|
| 70 | %doc doc/autor.txt
|
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 | %changelog
|
|---|
| 74 | * Fri Jun 9 2017 Dmitriy Kuminov <coding@dmik.org> 1.0.0-2
|
|---|
| 75 | - Hardcode helper path to converters as `parse source` does not contain a full
|
|---|
| 76 | path when CMD is converted to EXE and started by name w/o any path.
|
|---|
| 77 |
|
|---|
| 78 | * Thu Jun 8 2017 Dmitriy Kuminov <coding@dmik.org> 1.0.0-1
|
|---|
| 79 | - Store binary distribution on github for easy patching.
|
|---|
| 80 | - Change epoch to 1 due to changed versioning scheme.
|
|---|
| 81 | - Fix converter execution failure with no arguments.
|
|---|
| 82 | - Use single source base for both rexx2vio.cmd and rexx2pm.cmd.
|
|---|
| 83 | - Properly handle errors and use output EXE dir for temp files instead of TMP.
|
|---|
| 84 | - Prefer RC16.EXE to RC.EXE when choosing resource compiler.
|
|---|
| 85 | - Install VIO/PM stubs and helper script to usr/lib/rexx_exe instead of usr/bin.
|
|---|
| 86 | - Depend on os2tk45 that provides RC16.EXE.
|
|---|
| 87 |
|
|---|
| 88 | * Thu Sep 08 2011 yd
|
|---|
| 89 | - use a temporary name for resource files, fixes smp builds.
|
|---|