RE: Binary RPM naming | doubt

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

 



Hi 

I have tried using the SPEC files conditional statements.

My spec file contains

%define my_build_name_fmt xxx 

%define _build_name_fmt my_build_name_fmt.%_arch.rpm
 

And I am building the rpm as

rpmbuild -ba yyy.spec --define "_build_name_fmt
$my_build_name_fmt.%_arch.rpm"


The output I am getting is 

Wrote: /home/sapient/redhat/RPMS/my_build_name_fmt.i386.rpm
Wrote: /home/sapient/redhat/RPMS/my_build_name_fmt.i386.rpm


Please help...




-----Original Message-----
From: rpm-list-bounces@xxxxxxxxxx [mailto:rpm-list-bounces@xxxxxxxxxx]
On Behalf Of Luciano Miguel Ferreira Rocha
Sent: Thursday, October 26, 2006 3:56 PM
To: rpm-list@xxxxxxxxxx
Subject: Re: Binary RPM naming | doubt

On Thu, Oct 26, 2006 at 03:20:31PM +0530, Lis Maria Thomas wrote:
> Hi
> 
> There is a variable defind at my %prep section as
> 
> 	new_variable_new=aaa
> 
> And while doing the rpm build, I am givin the following command
> 
> rpmbuild -ba yyy.spec --define "_build_name_fmt
> $new_variable_new.%_arch.rpm"
> 
> 
> The binary rpm it is creating is not takin the value specified, rather
> it is giving the output as :
> 
> Wrote: /home/sssss/redhat/RPMS/.i386.rpm
> Wrote: /home/sssss/redhat/RPMS/.i386.rpm

It is taking the value you specified. At the moment you called rpmbuild,
$new_variable_new didn't exist, did it?

The %prep, %build, %install, and others are scripts that rpmbuild
creates, and executes as outside programs. They can't influence rpmbuild
environment.

> Can  u help me out with what could be the possible mistake I have
> made...

You'll have to use spec's conditional statements to set _build_name_fmt.
And you can set _build_name_fmt to the output of a script too, with
something like:
%define _build_name_fmt %(echo pkg)


-- 
lfr
0/0

_______________________________________________
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