I want to build RPM files and I want them to be commonly used and beeing not depending on which distribution is installed. Now I found a requirement which name is different on RHEL and SLES. I found this as possible solution:
%if 0%{?suse_version}
Requires: jdk >= 2000:1.8.0_00-fcs, netcat, telnet, at
%else
Requires: jdk >= 2000:1.8.0_00-fcs, nc, telnet, at
%endif
But my problem with is, that it's an if query for the Build process, what I wish to have is depending on the distribution I install, the already build rpm file would solve this. Because with this solution, I would need to build RPM files for every kind of centos and rhel and sles distribution on all these different OSes while only the name of nc and netcat differ as Required packages.
Any idea how I can do that?
Thanks