Often I need to create packages which another package depend on (i.e. build dependencies). Instead of having all those packages first being build in my ppa (which can sometimes take some time), I would like to use the results directory from pbuilder as a source for the pbuilder itself.
How can I do this? Can I do this via a hook?
This can be done a few ways. As mentioned by adol, the Ubuntu wiki has a nice example of how to do this by creating a local repository with mini-dinstall and adding that to your pbuilder config. Dennis' answer about using dpkg-scanpackages works as well.
I've been doing this recently with apt-ftparchive. I like this approach since I find it very light weight. Here's annotated example of what I do:
You also need a pbuilder hook:
Now all you have to do is drop the packages into your local repo and they will be available to pbuilder. If you are trying to chain build a string of dependencies you can make you pbuilder results directory as your local repo directory.
You can probably imagine other variations on this. For instance, you could use dput with a post_upload_command to generate the Packages file instead of using the hook.
This Debian wiki page could also be helpful.
You can stick them in a simple repo created with dpkg-scanpackages and make that available via apache. Then update pbuilder's apt config to use your repo.