Re: canonical way to detect platform/distribution
devzero2000 <[email protected]> Sat, 19 Apr 2008 22:17:53 +0200
| Newsgroups | gmane.linux.redhat.rpm.general |
|---|---|
| Message-ID | <[email protected]> |
IMHO, the general problem of vendor rpm fragmentation isn't likely to be resolved with rpm macros. But for a single distro (rhel vs suse vs mandriva vs ...) and different release of this, it is a possibility: not good in general but it's life............... Macros if abused are for itself a source of incompatibility: use it carefully. I know it is not so simple but a little discipline and more QA in rpm packaging it is often necessary if not desiderable always, AFAICT. Regards 2008/4/19 Jeff Johnson <[email protected]>: > > > On Tue, Apr 15, 2008 at 1:02 PM, Brian Reichert <[email protected]> > wrote: > > > 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... > > > > > You likely need to install the redhat-rpm-config package, that's usually > where > vendor peculier macros are supplied by RHEL. > > 73 de Jeff > > _______________________________________________ > Rpm-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/rpm-list > _______________________________________________ Rpm-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/rpm-list