Re: version depency determined at compile time?

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

 




-----Original Message-----
From: Jos Vos <jos@xxxxxx>
Sent: Dec 30, 2003 11:16 AM
To: rpm-list@xxxxxxxxxx
Subject: Re: version depency determined at compile time?

Hoi Hugo,

On Tue, Dec 30, 2003 at 04:49:13PM +0100, Hugo van der Kooij wrote:

> The gnomesword package can be build against various versions of sword but
> it will only run against the one it is compiled against.
> 
> To make this clear I want to put in a dependency at compile time.
> 
> So if I have sword-1.5.6 installed and build with my spec file I want a
> dependency for sword = 1.5.6
> 
> But if I compile against sword 1.5.7 I want the requirement to be sword =
> 1.5.7
> 
> Is there a way to gain this information at build time?

Add this to your spec file:

  Requires: sword = %(rpm -q --queryformat '%%{version}' sword)

---------------------------------------------

  having never tried something this general before, i'm speaking from a position
of complete ignorance, but does a spec file really support the equivalent of
command substitution with a "%"?  using shell behaviour as a model, i would 
have thought it would be "$(rpm ...)" instead.

  i'm just a little surprised, that's all, and i can't find the definitive answer in the
docs at the moment.

rday



_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux