RPM spec file conditionals
I never remember how to do this, if you need vendor specific bits inside a spec file (like init scripts etc) you can use this to do different things depending on vendor.
%if "%{_vendor}" == "suse"
# Suse specific stuff
%endif
%if "%{_vendor}" == "redhat"
# Redhat specific stuff
%endif
If…else works like this:
%if "%{vendor}" == "suse"
# Suse specific stuff
%else
# Redhat specific stuff
%endif
Subscribe via RSS