Change directory where RPM builds happen

March 2, 2009

On Red Hat / Fedora systems RPM build looks for SOURCES, BUILD etc in /usr/src/redhat.

If you want to use a different directory for this you have to set the %_topdir value. Most sites suggest doing this in rpmrc or some other conf file, I like passing this on the cmd line… and I forget how to do this every couple of years… so here it goes:

rpmbuild --define "_topdir somedirectory/path/"

Credit:
http://osdir.com/ml/user-groups.linux.gnhlug/2005-11/msg00173.html

Leave a Reply

You must be logged in to post a comment.