RPM spec file – Is it possible to dynamically populate a spec file variable
You can define rpmbuild variables with %(cmd) at the top of the spec file. Notice the command is in parenthesis, not curly brackets. An example: %define whoami %(whoami) And elsewhere in the spec file, such as a script or the build/install sections, use the variable as normal in the curly brackets like this: echo “The … Read more