Re: [rpm-list] Setting binary rpm name according to a condition

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

 



Kevin Cosgrove wrote:
On 24 October 2006 at 8:53, Frank Cusack <fcusack@xxxxxxxxxxx> wrote:

I want to build a src rpm file that can be built to a binary rpm. The
name of the binary rpm depends on a condition (actually, I want to check
the distribution type and set the binary rpm name accordingly). How can I
do that?
%_build_name_fmt

I like that A LOT better than my hack. Anything to simplify a spec file. Thanks! --
Kevin
Thanks for the answers. However, if I write something like:

if [ "%_vendor" = "suse" ] ; then
       _build_name_fmt="suse_name"
else if [ "%_vendor" = "redhat" ] ; then
       _build_name_fmt="redhat_name"
else
       echo "This version is not supported"
fi
fi


it doesn't set _build_name_fmt to the requested value. If I print it, it shows the following: _build_name_fmt = %{ARCH}/%{NAME}-%{VERSION}-%{RELEASE}-%{DISTRIBUTION}-%{ARCH}.rpm

I saw somewhere that I can set it in .rpmmacros. Is it the only way? Can I put a condition like that in the .rpmmacros file?

Thanks,
Erez


_______________________________________________
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