[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
RE: rpmbuild
- From: hmiller hiwaay net
- To: RPM Package Manager <rpm-list redhat com>
- Subject: RE: rpmbuild
- Date: Thu, 06 Jul 2006 13:44:35 -0500 (CDT)
How do you get environment variables into an rpmbuild command?
I have a need to do that, and I have tried using environment variables in the
~/.rpmmacros file with limited success.
I have an environment variable that knows the version of the software I am
building. It is named SW_VERSION. In the ~/.rpmmacros, I added this line:
%version $SW_VERSION
In my specfile I have the following:
Version: %{version}
When I do the rpmbuild command, the Version appears to be handled correctly
until rpmbuild writes the package file. In the package file, the name of the
package includes the name of the environment variable (SW_VERSION) instead of
the value in the environment variable (in this case, 3.2.0).
Since I call rpmbuild from a makefile, I have the makefile generate a new
~/.rpmmacros file every time where I hard-code the version instead of using the
environment variable. Is that the best I can do, or is there a way for
~/.rpmmacros to use an environment variable?
Hope I made that clear.
Herb
Quoting "Stanley, Jon" <Jon Stanley savvis net>:
> Shoot away.....
>
> >-----Original Message-----
> >From: rpm-list-bounces redhat com
> >[mailto:rpm-list-bounces redhat com] On Behalf Of hmiller hiwaay net
> >Sent: Thursday, July 06, 2006 1:33 PM
> >To: rpm-list redhat com
> >Subject: rpmbuild
> >
> >Is this the correct list for rpmbuild questions?
> >TIA,
> >Herb Miller
> >
> >_______________________________________________
> >Rpm-list mailing list
> >Rpm-list redhat com
> >https://www.redhat.com/mailman/listinfo/rpm-list
> >
>
> _______________________________________________
> 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]