Nano HOWTO: Getting started with libvirt hacking
How to build libvirt from git on Fedora:
(cd ~/rpmbuild && mkdir BUILD BUILDROOT RPMS SOURCES SPECS SRPMS)
git clone git://git.et.redhat.com/libvirt.git
git checkout -b mystuff
The above will clone the tree, checkout a branch to hack on, build and test the code, then generate source and binary RPMS. You’ll also be set then to do local manual builds.
Thanks to danpb for clues.