Original Message:
Sent: Mon February 20, 2023 09:38 AM
From: Joerg Kauke
Subject: generally question: rpm %define macro
Hi Ayappan,
thanks a lot for your quick answer.
In this case I have to copy both versions of the tarball and decide what to install in the pre script.
Thanks again...
best regards,
Joerg
------------------------------
Joerg Kauke
Unix Administrator
COOP Switzerland
Original Message:
Sent: Mon February 20, 2023 08:30 AM
From: Ayappan P
Subject: generally question: rpm %define macro
These are macros decided at the build time, not at installation time.
Probably you can look into pre/post installation scripts.
------------------------------
Ayappan P
Original Message:
Sent: Mon February 20, 2023 07:59 AM
From: Joerg Kauke
Subject: generally question: rpm %define macro
Hello Community, dear open source team.
I'm facing a problem creating an rpm which installs different tarballs depending on the AIX OS release.
I tried to define a variable, where the value is dynamically build by "uname -r", then I want to use this value in %files for choosing the tarball for 7.2 or 7.3
%define RELEASE %(uname -r)%files/tmp/COOPtestfile_%{RELEASE}.tar
I also tried:
%global techLevel `uname -r`%global techLevel %{expand:uname -r}%global techLevel %{?shell:uname -r}
Nothing is working. In the first two example the variable will not be dissolved and for the last two, the variable is empty.
Do anyone have an idea how to solve this? Is it even possible to do it this way?
Many thanks in advance for your help and support.
best regards,
Joerg
------------------------------
Joerg Kauke
Unix Administrator
COOP Switzerland
------------------------------
#AIXOpenSource