Adding fdftk to php under debian
Written by jeremy on October 18, 2007
Since there is not an easy step by step howto for adding features to packages I decided to write a quick and dirty one myself. this is also for reference if I ever need it later. Read more to see what I did….
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Debian Build from source:
– Download source packages
apt-get source *packagename*
– Change any config rules
vi *packagename directory*/debian/rules
– Download build dependencies
apt-get build-dep *packagename*
– Compile the package
apt-get -b source *packagename*
– Install it
dpkg -i *packagename*.deb
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Adding fdf support to php5-5.2.0:
Download source directory:
apt-get source php5
Download fdftk:
wget http://download.macromedia.com/pub/developer/acrobat/FDFToolkitForUnix.tar.gz
Extract fdftk:
tar xzf FDFToolkitForUnix.tar.gz
Copy files to /usr/local/:
cp "FDFToolkitForUnix/Headers and Libraries/Headers/*" /usr/local/include
cp "FDFToolkitForUnix/Headers and Libraries/LINUX/*" /usr/local/lib
Edit rules file php5-5.2.0/debian/rules and add under COMMON_CONFIG –with-fdftk=/usr/local Make sure you put a \ after the last configure line before the fdftk line
--with-exec-dir=/usr/lib/php5/libexec \
--with-fdftk=/usr/local
Install the newly compiled deb files:
dpkg -i *.deb
References:
http://www.debian.org/doc/FAQ/ch-pkg_basics.en.html
http://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html
http://us3.php.net/fdf
http://www.adobe.com/devnet/acrobat/fdftoolkit.html