diff --git a/README.rst b/README.rst index fcae578..5a4a5a4 100644 --- a/README.rst +++ b/README.rst @@ -64,7 +64,11 @@ PHP versions the default one that gets run when just typing ``php``:: You need to have ``inst/current-bin`` in your ``$PATH`` to make this work. +Compiling extensions +-------------------- +PECL extensions can be compiled for any installed PHP version using the ``compile-extension.sh`` script:: + $ ./src/compile-extension apc 5.4.3 About phpfarm ------------- diff --git a/src/compile-extension.sh b/src/compile-extension.sh new file mode 100755 index 0000000..02d15cd --- /dev/null +++ b/src/compile-extension.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# @see http://cweiske.de/tagebuch/phpfarm-install-extensions.htm +# @example ./compile-extension.sh xdebug 5.4.3 + +EXTENSION=$1 +PHPVERSION=$2 + +mkdir src/extensions +rm -rf src/extensions/* +pecl download $EXTENSION +tar xvzf $EXTENSION* +cd $EXTENSION* +/opt/phpfarm/inst/bin/phpize-$PHPVERSION +./configure --with-php-config=/opt/phpfarm/inst/bin/php-config-$PHPVERSION +make +make install