Sounds to me like you're doing it the hard/wrong way. Why are you compiling so many things from scratch? If you do really need to compile that many things, stop doing it on every box - one server (or VM) gets to be the build-box with all of the compilers and other related tools installed, and build rpm files for all these things and stick them into a local repo that your other servers can pull from. Yum does a good job handling dependencies you just need to get everything you need into rpm packages first.
Or if you really want to keep compiling everything, maybe look at using Gentoo instead of CentOS - then you will be compiling EVERYTHING from scratch, including re-compiling things as patches are released. But the Gentoo package manager handles dependencies for you, and it is quite easy to setup a local portage repository with your own custom code/patches and still have dependencies automatically resolved for you.
As to post-install scripting, imho that method is kinda obsolete now replaced by config-management. Stick puppet on there (or chef, salt, ansible, or whatever the flavor-of-the-week is) and let it take care of ensuring things are setup the way they should be. If CentOS is your preferrred distribution then maybe look at Katello - it is the upstream free/open-source project behind RedHat's Satellite 6 product (Satellite <= 5.x were based on Spacewalk) - it will do config-management with puppet, using foreman as a web-based gui for puppet, will host local yum repos (both mirroring web repos locally to save bandwidth if you have lots of nodes to patch, as well as local custom repos with your own packages), and will also do most of what is needed for fully automated provisioning of either VMs (local or cloud-based) or bare-metal boxes.