How to define a variable in RPM specs? I have 14 folders to create in the RPM and I am creating by following command:
mkdir -p /opt/{Folder,Names,Are,Pretty,Cumbersome}
My plan is to declare a array variable for all the folders.
How to define a variable in RPM specs? I have 14 folders to create in the RPM and I am creating by following command:
mkdir -p /opt/{Folder,Names,Are,Pretty,Cumbersome}
My plan is to declare a array variable for all the folders.
In a spec file it is called a macro:
https://rpm-software-management.github.io/rpm/manual/macros.html
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_global_preferred_over_define
Each section is just a shell script so you can use normal shell variables. But, it does not survive past the end of the section. So if you want to use something in more than one section you need to use macros.