I would like my spec file to dynamically pick up rpm requirements
depending on the OS on which the RPM is being installed. for e.g. If the
RPM is being installed on Fedora box, then the spec should pick up one
set of dependency rpms, while if its installing on a RedHat Enterprise
box, then it should pick up another set of RPMS.
I would like to know whether and how this is possible in the spec
file ? Thanks for your time and advice
Yes this is possible, though it requires that the OS variation be declared in
some standard format by the OS...it is "often" found in /etc/. Though there
is no standard format. One could use a structure to discover various points
of interest on the operating system, but discovering with something is
fedora, redhat, debian, slackware, and their various versions. And then one
needs to consider user modified systems.
Yeah I realize that detecting various *NX flavors would be difficult
job. My current project
But be ready for the fact that you aren't really going to be able to cover
ever single instance without developing and maintaining the one single spec
file becoming a full time job as you try to keep up with all the changing
systems. Worry instead about covering standards and creating a standards
compliant spec file. Allow users to "customize" the spec files for their
needs instead. Keeping things simple will make things easier on your users,
trying to cover every possibility will make things harder for you, and will
also make things harder for your users when they DO find they must customize
your spec file to work for their system. Not everyone is system builder, and
not everyone has the patience to dig through a complex logic structure.
Scot
Dhanvi