Hi Martin,
I want to find a way to install things on the \Programs\ path without hard coding it.
The thing of course is that the drive-letter for %UNIXROOT% is not necessarily
the same as the drive-letter for %PROGRAMS%.
Since RPM comes from the *NIX world, which has a single-root concept for the
file-system, stored (file) paths in a '.rpm' package _must_ start with a '/',
a requirement that propagates to the %files section of a specfile.
This is why '/@unixroot' exists at the scripting level, where it basically
functions as a placeholder for %UNIXROOT%, which is evaluated at install-time
on the target-system.
If the %PROGRAMS% location at the target-system is on a different drive than
the %UNIXROOT% location, its _true_ location cannot be used as a target for the
package files. One could strip the drive-letter and ':' from %PROGRAMS% and
use that as a destination, which would result in that path being created under
the %UNIXROOT% location.
This is why I mentioned packaging _legacy_ applications earlier.
I think we need to discuss how we would solve this.
Solutions can range from '@unixrooting' such legacy applications,
to using ZIP-files in the '.rpm' and extract that with -d,
to installing to /@unixroot/var/tmp and then moving to %PROGRAMS%,
to rpm-relocating at install-time,
to ...
I have also contemplated introducing additional placeholders, like @programs
or even a more generalized form where '/@?/' could be a placeholder for a drive
so that '/@C/AUTOEXEC.BAT' would be possible.
Any four-char string in the form of '/@?/' would mark such a placeholder where
? is in [C-Z] or [c-z].
Of course the real RPM gurus are at BWW, and I think that once we have a more
clear picture on this, their input and advise is very important.