Brian Reichert
2008-04-15 17:02:15 UTC
I'm trying to design a spec file that does different things depending
on the distribution. But, I can't see a canonical way of doing it.
My current development platform is CentOS 5.1.
On this list, and on the net, I've seen this construct
%if 0%{?fedora} > 4 || 0%{?rhel} > 4
# do stuff
%endif
or this:
%if 0%{rhel_version}%{centos_version} == 0
# do stuff
%endif
but none of these sorts of macros seem to be defined by the rpmbuild
universe.
'rpm --showrc' doesn't seem to provide any clues about distribution or
platform.
Any advice out there? Pointers welcome...
on the distribution. But, I can't see a canonical way of doing it.
My current development platform is CentOS 5.1.
On this list, and on the net, I've seen this construct
%if 0%{?fedora} > 4 || 0%{?rhel} > 4
# do stuff
%endif
or this:
%if 0%{rhel_version}%{centos_version} == 0
# do stuff
%endif
but none of these sorts of macros seem to be defined by the rpmbuild
universe.
'rpm --showrc' doesn't seem to provide any clues about distribution or
platform.
Any advice out there? Pointers welcome...
--
Brian Reichert <***@numachi.com>
55 Crystal Ave. #286 Daytime number: (603) 434-6842
Derry NH 03038-1725 USA BSD admin/developer at large
Brian Reichert <***@numachi.com>
55 Crystal Ave. #286 Daytime number: (603) 434-6842
Derry NH 03038-1725 USA BSD admin/developer at large