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@xxxxxxxxxx>: > Shoot away..... > > >-----Original Message----- > >From: rpm-list-bounces@xxxxxxxxxx > >[mailto:rpm-list-bounces@xxxxxxxxxx] On Behalf Of hmiller@xxxxxxxxxx > >Sent: Thursday, July 06, 2006 1:33 PM > >To: rpm-list@xxxxxxxxxx > >Subject: rpmbuild > > > >Is this the correct list for rpmbuild questions? > >TIA, > >Herb Miller > > > >_______________________________________________ > >Rpm-list mailing list > >Rpm-list@xxxxxxxxxx > >https://www.redhat.com/mailman/listinfo/rpm-list > > > > _______________________________________________ > Rpm-list mailing list > Rpm-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/rpm-list > _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list