Conditional RPM installation
Essentially I want to install an RPM that can performs certain actions upon a conditional flag.
Basically, what I want is only one RPM that will (1) perform some base actions + rebuild all databases by default OR (2) perform same base actions + leave databases intact if I were to specify a flag of some sort. This is best illustrated by the following pseudocode:
Rebuild databases (default installation):
rpm -ivh myrpm.rpm
Leave databases intact (conditional installation):
rpm -ivh --define "rebuild no" myrpm.rpm
I know this is possible when building an RPM by using %define tags in the .spec file but is it possible when installing an RPM ?
Any help appreciated