[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to build optional package if certain requirement is satisfied?



Hi, Abel,

Thanks for the quick response. It works like a charm.

I really appreciate your help with this.


Liguo Song (Leo)


On Wed, 27 Aug 2003, Abel Cheung wrote:

> On 2003-08-27(Wed) 01:38:03 -0500, Liguo Song wrote:
> > Dear RPM Users,
> > 
> > I have a problem with packaging RPMs. The source tar ball is configured in
> > such a way that some optional components will be build if a certain
> > requirement is met. I want to package these optional components into a
> > separate package, which depends on the requirement.
> 
> Would something like this work for you?
> 
> 
> %define have_optional_component %(if some_command_succeded; then echo 1; else echo 0; fi)
> 
> %if %have_optional_component
> %package optional_components
> .......
> %endif
> 
> Abel
> 
> 
> > I know of the conditional build ability, with which you can define certain
> > macros in the command line of rpm to control the build behavior. But, I
> > prefer the minimal input from my src rpm user. So, I want to automate this
> > procedure with something like this (pseudo codes of spec files. :)
> > 
> > %if required-package
> > %package optional-components
> > Summary: some optional stuff
> > BuildRequires: required-package
> > Requires: other-requirements
> > 
> > %files
> > %{_bindir}/optional-bins
> > 
> > Is this possible right now with rpm-4.1?
> > 
> > Thanks for your comments.
> > 
> > 
> > Liguo Song (Leo)
> > 
> > 
> > 
> > _______________________________________________
> > Rpm-list mailing list
> > Rpm-list@redhat.com
> > https://www.redhat.com/mailman/listinfo/rpm-list
> 
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []