[lug] RPM rpmrc question

Scott Herod herod at dimensional.com
Mon Mar 1 17:39:51 MST 2004


I know that I'm working with rpmbuild back-a__ward but I want to build 
RPMs from a Makefile rather than the other way around.  I want something 

rpmbuild -bi SPECS/my_specfile-0.1.0-1.spec

However, that will look for SOURCES in /usr/src/redhat/SOURCES unless I
create (I think) a pair of appropriate files ~/.rpmrc and ~/.rpm_macros:


%_topdir        /path/to/my/packages

Is it possible to include the %_topdir variable on my command line?

I can use an --rcfile directive with local files but rpmbuild doesn't seem 
to expand '.' inside the rpmrc and rpm_macros files.  How can I make the 
source trees relocatable without essentially having the makefile write an 
rpmrc and rpm_macro file?

Thanks for any suggestions.


More information about the LUG mailing list