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:

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 \

Install the newly compiled deb files:
dpkg -i *.deb



Posted Under: debian, linux, php

About jeremy