My words on free/open source software

Sunday, April 13, 2008

RPM Spec: conditional build based on host distro

When writing spec of RPM, often you need to write some special instructions that are needed only on some distros or versions, but not all. You can use this:

# Do something for FC4 and beyond.
%if 0%{?fedora} >= 4
# ...

No comments:

About Me

My photo
Santa Cruz, California, United States