I helped Robbster out on #clug today, building php4 for feisty (it's been dropped after edgy, in favour of php5). If you want to install it, don't care about security holes, and want to use the debs I created, add this line to your apt sources list, and go wild:
deb http://ftp.leg.uct.ac.za/pub/stuff/tmp/php4-feisty ./
If on the other hand you want to know how to do it (so when the next PHP security hole appears tomorrow, you can build the latest version yourself), read on:
I've never used pbuilder before, so it was fun:
# aptitude install pbuilder
/etc/pbuilderrc to point to your closest mirror, and uncomment the
COMPONENTSline (so that you get universe included)
# pbuilder create
Now pbuilder is ready for work. Get the latest sources from debian (Download those 3 files at the end, dsc, orig.tar.gz and diff)
# pbuilder build *.dsc
Sit back and watch...
When it's done, you probably want to create a trivial repository of your debs:
# cd /var/cache/pbuilder/result/; dpkg-scanpackages . /dev/null | gzip -c -9 > Packages.gz
Then add this to your
deb file:///var/cache/pbuilder/result/ ./
Wohoo. Remember to watch out for those security holes...