To build successfully a rpm package from my .spec file I need alias a command. The alias command is not taken into account in the .spec file. I can of course run it in my shell before the build, but I would like to include the process in .spec file.
The link[1] is confusing. Something like: pm alias --MyAlias --define '_MyProg !#:+' ?
Or the popt alias setting ? Define a global variable like MyAlias= MyProg ?
Thank you for hints
[1]https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Gu...
On Sun, Dec 6, 2015 at 10:28 AM, arnaud gaboury arnaud.gaboury@gmail.com wrote:
To build successfully a rpm package from my .spec file I need alias a command. The alias command is not taken into account in the .spec file. I can of course run it in my shell before the build, but I would like to include the process in .spec file.
The link[1] is confusing. Something like: pm alias --MyAlias --define '_MyProg !#:+' ?
Or the popt alias setting ? Define a global variable like MyAlias= MyProg ?
Thank you for hints
One solution, and maybe cleanest, would be to unset an environment variable (result would be same). I can add this in my spec file:
if [ -n $MyVar ]:the unset MyVar fi
It works. Now best would be to save this variable, unset it at begining and set it again at post. I can use printenv | grep MyVar to catch the Var:Value, but no idea how to save it in a %variable in my spec file. Idea would be something like this in pseudo code: %define MyVar printenv | grep MyVar
[1]https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Gu...
google.com/+arnaudgabourygabx