Re: Create two different rpms in the same spec file

Tony Earnshaw <[email protected]> Sun, 20 Jan 2008 20:04:52 +0100
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>
Jos Vos skrev, on 20-01-2008 11:10:

>> I want to create two different rpms (one for redhat and the other for suse) in the same spec file.
>> I have a file that is needed be in the same path (/etc/init) for both distros,
>> The file's name is the same but its content is not the same for the two distros.
>> How can I do it?
>> Can %install can get "-n" as a parameter?
> 
> Why do you think of "-n"?  Will the resulting package have different
> names on RH and SUSE?
> 
> Anyway, it's simple when you use the %if / %endif constructions.
> Note that it's a matter of taste if you really want this.  In my
> personal opinion, maintaining one spec file for multiple distros
> often (with more complex packages) results in unnecessary complex
> spec files.

As far as "production quality" specs that I use go, Sam Varshavchik 
(Courier) and Buchan Milne (OpenLDAP) both do it with impunity (Buchan's 
distinguishes purely between Mandriva and Red Hat derivatives).

Simon J Mudd (Postfix) forces the user first to run a script to 
determine the OS/distro and build the spec file.

My own spec files use a version of Sam's, which I stole from him ...

Best,

--Tonni

-- 
Tony Earnshaw
Email: tonni at hetnet dot nl