_prefix hard-coded to /usr?

hmiller at hiwaay.net hmiller at hiwaay.net
Sat Nov 28 19:39:24 UTC 2009


Quoting hmiller at hiwaay.net:

In my RPM .spec file, I have set PREFEX to /usr/local.

In the %post section, I need to use the prefix variable to make some changes.
However, when I echo ${_prefix} it is not set to /usr/local.  It is  
set to /usr

If I do an "rpmbuild --showrc", there is a line showing prefix set to /usr.

Is there some trick to using _prefix in my %post scripting section of  
my .spec file?

I need the actual PREFIX value that is set in my .spec file, or the  
--prefix value entered on the command line by the user who installs  
the subsequent rpm file.

Thanks,
Herb Miller






More information about the Rpm-list mailing list