OS/2, eCS & ArcaOS - Technical > Programming
Creating a RPM package for PMDLL
ivan:
I would ask why go to all the trouble when a simple zip file will do the job? To me it looks like a lot of effort for no real gain.
Dave Yeo:
--- Quote from: Lars on September 29, 2020, 09:02:06 am ---Just a wild guess (I have no experience writing RPM spec files):
use %% instead of % for refering to _bindir.
An OS/2 commandline requires escaping the % character by specifying two % characters.
As a test you can run:
rpm --eval %%_bindir
try instead:
rpm --eval %_bindir
and you will realize that the former works while the latter does not.
However I don't know if installing an RPM will lead to invocation of an OS/2 commandline with the arguments passed in as written in the RPM spec file.
Something else I don't understand (but maybe it is intended) is that if you run:
rpm --eval %%_bindir (or rpm --eval %%{_bindir})
is that this is returned:
/@unixroot/usr/bin
I hope that /@unixroot is silently resolved by using the UNIXROOT environment variable (which needs to be set on your system).
--- End quote ---
Hi Lars, from a cmd prompt,
--- Code: ---[H:\tmp]rpm --eval %%_bindir
%_bindir
[H:\tmp]rpm --eval %_bindir
/@unixroot/usr/bin
--- End code ---
Note that even the second one isn't correct as /@unixroot will resolve here as /w:/usr/bin.
And yes, %UNIXROOT% needs to be set to a drive letter plus colon, though on a single root system such as everything on C:, /usr/bin will work for most programs with exceptions for DOSISH programs that consider / to be the start of a parameter and use a drive letter to tell it's a PATH. Wlink is an example that needs a drive letter when using / as a dir separator.
Lars:
Try:
--- Code: ---%wps_object_create_begin
PMDLL_EXE:WPProgram|PMDLL|<WP_DESKTOP>|EXENAME=((%{_bindir}/PMDLL.EXE));ASSOCTYPE=Executable,Dynamic Link Library;ASSOCFILTER=*.EXE,*.DLL|R
%wps_object_create_end
--- End code ---
Lars:
--- Quote from: Lars on September 29, 2020, 06:36:30 pm ---Try:
--- Code: ---%wps_object_create_begin
PMDLL_EXE:WPProgram|PMDLL|<WP_DESKTOP>|EXENAME=((%{_bindir}/PMDLL.EXE));ASSOCTYPE=Executable,Dynamic Link Library;ASSOCFILTER=*.EXE,*.DLL|R
%wps_object_create_end
--- End code ---
--- End quote ---
By the way: you can only set the ASSOCTYPE's that actually exists. On my system, "Executable" exists but not "Dynamic Link Library". Check your XWorkplace Workplace Shell Object.
In the end, the "lengthy" string that you specify as the 4.parameter (where parameters are separated by |) follows the setup strings as described in the "Workplace Shell Programming Reference"
Lars:
--- Quote from: Dave Yeo on September 29, 2020, 05:15:54 pm ---Hi Lars, from a cmd prompt,
--- Code: ---[H:\tmp]rpm --eval %%_bindir
%_bindir
[H:\tmp]rpm --eval %_bindir
/@unixroot/usr/bin
--- End code ---
Note that even the second one isn't correct as /@unixroot will resolve here as /w:/usr/bin.
And yes, %UNIXROOT% needs to be set to a drive letter plus colon, though on a single root system such as everything on C:, /usr/bin will work for most programs with exceptions for DOSISH programs that consider / to be the start of a parameter and use a drive letter to tell it's a PATH. Wlink is an example that needs a drive letter when using / as a dir separator.
--- End quote ---
... and now we are in deep shit trouble because the 4OS2 command line behaves as I have stated but the OS/2 command line behaves as you have stated.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version