[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: RPM spec in tar file (was Re: An introduction of the new cheerleader...)
- From: Kir Kolyshkin <kir darnet ru>
- To: fedora-devel-list redhat com
- Subject: Re: RPM spec in tar file (was Re: An introduction of the new cheerleader...)
- Date: Wed, 28 Jan 2004 01:55:18 +0300
Ian Pilcher wrote:
Kir Kolyshkin wrote:
To some extent, this can be solved using various %ifdef constructions
in spec file.
How? AFAIK, there is no canonical way for the SPEC file to determine
what distribution it is building on.
If there's no canonical way or a clean solution, there is always space
for ugly hacks...
Here's a short example for spec file working for various redhats and
suses. Yes I know it's ugly. But you got the idea.
%if %_vendor == "redhat"
# Define redhat-specific stuff here.
# If you want more precision, you can use the below define
# %define rh_ver %(rpm -q --queryformat %{VERSION} redhat-release)
# The problem is nested %if's doesn't always work well, therefore
%define suse_version 0
%endif
# The problem is %else doesn't work in all rpm versions, so avoid using it.
# SuSE guys made a good definition for us - so let's use it
%if %suse_version = 820
# Define stuff specific for SuSE 8.2
%endif
%if %suse_version = 830
# Oh, things for SuSE 8.3 goes here
%endif
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]