Simply copy this into /.rpmmacros
%packager Your <email> %distribution Personal custom flag %vendor You %_signature gpg %_gpg_path /.gnupg %_gpg_name your gpg name %_gpgbin /usr/bin/gpg
%_topdir /home/user/redhat %_tmppath /var/tmp/rpm
If you don't want to sign the packages you can comment out/delete the lines from %_signature to %_gpgbin. You can also change %_topdir to your liking.
as a normal user and install the package(s) that will be in redhat/RPMS/arch
RPM databases can get corrupted, or locks can get stuck forever.
Be sure to kill all running instances of RPM before doing this. rpm --rebuilddb may take a while. Afterwards you should be set.