Dotdeb has done a terrific job at precompiling some PHP 5 packages and environment for us.
Unfortunately in Dotdeb version of Debian Squeeze PHP5 packages I found the package php5-fileinfo to be missing.
So here are the blind steps (without explanations) on how to compile and install this package.
This is just an example unig the fileinfo package, the same can be done for other packages as well.
Note: Here we area assuming that the platform is an amd64
Install the required packages
apt-get install dh-make-php php5-dev build-essential libmagic-dev
Set some environment variables
export DEBFULLNAME="Guillaume Plessis"
Download the PECL fileinfo module sources
pecl download fileinfo
Create debian source package: php-fileinfo-1.0.x
dh-make-pecl --only 5 Fileinfo-1.0.4.tgz
Build the debian package
Install the package
dpkg -i ../php5-fileinfo_1.0.4-1_amd64.deb
Take a look at the result of the installation
Both above files should be present
Note: if you have installed the ‘cli’ and ‘cgi’ versions of PHP5 as well, then the following files should also be present: