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
Here are the steps I did:
cd /usr/src
apt-get build-dep php5
apt-get source php5
wget http://download.macromedia.com.....nix.tar.gz
tar xzf FDFToolkitForUnix.tar.gz
cp FDFToolkitForUnix/Headers\ and\ Libraries/Headers/* /usr/local/include/
cp FDFToolkitForUnix/Headers\ and\ Libraries/LINUX/* /usr/local/lib/
nano php5-5.2.6.dfsg.1/debian/rules
**I changed lines 109 and 110 to
–with-system-tzdata \
–with-fdftk=/usr/local
apt-get -b source php5
It compiled successfully. I tested this on Ubuntu-Server 9.04 _Jaunty Jackalope_ – Release i386 (20090421.1)
Pingback: PHP setup using rpm
Hello, I am trying to install php5 with fdftk support on a debian box(2.6.32-5-amd64).
When I completed the following steps succefully, I created a test.php file with this line of code:
$test = fdf_create();
But, the browser displayed the error “Fatal error: Call to undefined function fdf_create()”
Here are the steps I followed:
$: cd /usr/src
$: wget http://download.macromedia.com.....nix.tar.gz
$: tar -xaf FDFToolkitForUnix.tar.gz
$: cp FDFToolkitForUnix/Headers and Libraries/Headers/* /usr/local/include/
$: cp FDFToolkitForUnix/Headers and Libraries/LINUX/* /usr/local/lib/
$: apt-get source php5
$: apt-get build-dep php5
$: cd php5-5.3.3/debian
Opened up the file rules in a text editor
under the COMMON_CONFIG add this line
–with-fdftk=/usr/local
Opened up file setup-mysql.sh
Edit this line:
$mysqld > $datadir/run.log 2>&1 &
With this line:
$mysqld –user=root > $datadir/run.log 2>&1 &
$: apt-get –b source php5
$: dpkg –i .deb
could it be the version of php5 I am using? or do you know of anything else that might help?
Thank you!
I would make sure you have a \ at the end of the line before the –with-fdftk in the COMMON_CONFIG. Also you can test to see if fdf is installed correctly by outputting phpinfo() it will have fdf listed in the modules list.
But I see you are using 5.3.3. It looks like fdf has moved to a PECL extension based on this page: http://www.php.net/manual/en/fdf.installation.php
So you will have to install with the pecl command.
Thank you Jeremy for responding. I actually found a class to do what I need to do and so I don’t need to use the fdf methods from php…thank you again!
Great. Care to post your findings here so others can find the same classes?