Defines for detecting build OS?

Matthew Pounsett matt at
Tue Mar 3 16:50:15 UTC 2009

On 03-Mar-2009, at 11:39, Greg_Swift at wrote:

> In Fedora there is a file /etc/rpm/macros.dist that comes with the
> fedora-release package.  It defines (this is for fedora 8, increment
> accordingly):

Okay, so that's part of it.  At least some OSes define this in /etc/rpm.

My current concern is trying to port an RPM which references %rhel and  
%fedora to CentOS 5.  The only RHEL boxes I've got at the moment to  
compare against are RHEL4, which apparently doesn't define %rhel.

> The %if 0%?{rhel} ... basically translates so that if %rhel isn't  
> defined
> you still have a 0 to use in the equation.

Yeah, I know what the syntax means.. I was just using that as an  
example of the define I was hoping to find for other distributions.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the Rpm-list mailing list