i'm a big fan of Ubuntu and eaccelerator, but alas, I have found no good repositories for the binaries. Sadly eaccelerator needs to be compiled after every php update on Ubuntu, and even on Lucid they are frequent.

It's not a big job:

cd /home/user/src/eaccelerator-0.9.6 \
   && ./configure --enable-eaccelerator \
   && make clean \
   && make test \
   && sudo make install

Anyone know if there is any way to automize this to run on every php update?

link|improve this question
feedback

1 Answer

up vote 4 down vote accepted

Create file with php version:

# dpkg-query -W php5 > /var/cache/php_version

Create script(update eaccelerator if php update) and chmod +x it:

#!/bin/bash

if [ "`dpkg-query -W php5`" != "`cat /var/cache/php_version`" ];
        cd /home/user/src/eaccelerator-0.9.6 \
                && ./configure --enable-eaccelerator \
                && make clean \
                && make test \
                && sudo make install

        dpkg-query -W php5 > /var/cache/php_version;
fi

Add script to apt conf(/etc/apt/apt.conf.d/20eaccelerator):

DPkg::Post-Invoke { '/usr/local/sbin/eaccelerator_update';};

I'm a big fan of Debian/Ubuntu too.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.