yum install redhat-rpm-config rpm-build libtool gcc autoconf doxygen automake openssl-devel
useradd mockbuild
su – mockbuild
cat /home/mockbuild/.rpmmacros
%packager Your Name
%vendor Your Orgnazation
%_topdir /home/mockbuild/rpm
%_signature gpg
%_gpg_name Your Packaging Dept
%_gpg_path /home/mockbuild/.gnupg
%dist build_id
mkdir -p $HOME/rpm/{BUILD,RPMS/i386,SOURCES,SPECS,SRPMS}
wget http://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.10-stable.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flevent%2Ffiles%2Flibevent%2Flibevent-2.0%2F&ts=1330943339&use_mirror=netcologne
mv libevent-2.0.10-stable.tar.gz rpm/SOURCES/
rpmbuild -bb rpm/SPECS/libevent2010.spec
#root
cd /home/mockbuild/rpm/RPMS/i386/
rpm -Uvh libevent-2.0.10-11.i386.rpm libevent-devel-2.0.10-11.i386.rpm