cat >~/.rpmmacros <<END%_topdir %(echo $HOME)/rpmbuildEND
mkdir -p ~/rpmbuild/SOURCES ~/rpmbuild/RPMS/i386 ~/rpmbuild/RPMS/noarch ~/rpmbuild/SRPMS ~/rpmbuild/BUILD ~/rpmbuild/SPECS