# yum -y install yum-utils
# yum-builddep emacs
# yum install gnutls-devel ImageMagick-devel liblockfile-devel gtk3-devel
# wget http://mirror.datacenter.by/pub/fedoraproject.org/linux/updates/18/SRPMS/emacs-24.2-18.fc18.src.rpm
# rpm -qi emacs-24.2-18.fc18.src.rpm
# cd ~/rpmbuild/SPECS
Now, from emacs.spec comment references to
#%patch11 -p1 -b .bell-dont-work.patch
If you don't do this, the %build step will blow up thusly:
[ -r "/home/alf/rpmbuild/BUILD/emacs-24.2/src/config.in" ] || ( cd /home/alf/rpmbuild/BUILD/emacs-24.2 && autoheader )
config.status: executing gdbinit commands
./config.status: line 2113: syntax error near unexpected token `done'
./config.status: line 2113: `done # for ac_tag'
error: Bad exit status from /var/tmp/rpm-tmp.FlYxb2 (%build)
Commenting the patch is a bit crude, but all your loss (from my understanding) is some form of audible bell when emacs runs in an xterm - big deal.
# rpmbuild -ba emacs.spec
As usual, and your shiny new .rpms will be in the ../RPMS subdirs.