how to set up a personal environment for rpmbuild

as root:

yum install -y rpm-build make gcc

as regular user:

mkdir -p $HOME/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo "%_topdir  $HOME/rpmbuild" > $HOME/.rpmmacros