I've installed a fresh CentOS 5.0 (x86-64) and did:
(1) Create ~/.rpmmacros & ~/rpm directory structure as described in
Dan's email.
(2) yum install rpm-build rpm-devel python-devel xen-devel \
libxml2-devel readline-devel ncurses-devel gnutls-devel \
gcc
(3) wget ftp://libvirt.org/libvirt/libvirt-0.3.2-1.src.rpm
(4) rpm -i libvirt-0.3.2-1.src.rpm [NB: NOT as root]
(5) cd ~/rpm/SPECS; rpmbuild -ba libvirt.spec [NB: also NOT as root]
and it rpmbuilds just fine. So I suspect that your problem was
because you were trying to rpmbuild as root, which as mentioned
before is dangerous anyway.