Re: [PATCH] spec: Guess rhel/fedora macros from dist

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

 



On Wed, Mar 16, 2011 at 12:54:38PM +0100, Jiri Denemark wrote:
> ---
> If anyone knows how to make rpm to evaluate %(...) immediately and not
> at every appearance of rhel/fedora, that would be really cool.
> 
>  libvirt.spec.in |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index 02be928..bfc9206 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -1,5 +1,11 @@
>  # -*- rpm-spec -*-
>  
> +# if neither fedora nor rhel was defined, try to guess them from %{dist}
> +%if !0%{?rhel} && !0%{?fedora}
> +%define rhel %(echo "%{?dist}" | sed -ne 's/^\\.el\\([0-9]\\+\\).*/\\1/p')
> +%define fedora %(echo "%{?dist}" | sed -ne 's/^\\.fc\\?\\([0-9]\\+\\).*/\\1/p')
> +%endif
> +
>  # A client only build will create a libvirt.so only containing
>  # the generic RPC driver, and test driver and no libvirtd
>  # Default to a full server + client build

What is the particular reason we need this ?   %dist is set by
redhat-rpm-macros, which also sets  %rhel/%fedora, so I would not
expect to have one but not the other

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]