dotfiles

My configuration files
git clone git://git.finwo.net/misc/dotfiles
Log | Files | Refs

commit 365bc87be59fd764d7867b5b6a680d9f0cdd44a9
parent f047982c52317b490b7c6c981064ceeec7dba133
Author: finwo <finwo@pm.me>
Date:   Tue, 29 Oct 2019 11:09:34 +0100

Don't rely on pecl in phpvm

Diffstat:
A.gitignore | 2++
Mphp/root/usr/bin/phpvm | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 61 insertions(+), 6 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,2 @@ +*.swp +*.save diff --git a/php/root/usr/bin/phpvm b/php/root/usr/bin/phpvm @@ -85,6 +85,7 @@ for SUPPORT in ${SUPPORTS[@]}; do CONFOPTS="${CONFOPTS} --with-${SUPPORT}" done + # Run command case "$cmd" in list) @@ -128,16 +129,68 @@ case "$cmd" in cd "/usr/src/phpvm/php-${target}" make install || exit 1 - # Add memcached - printf "\n" | pecl install memcached || exit 1 + # Download/update memcached repo + [ -d "/usr/src/phpvm/ext-memcached" ] && { + cd /usr/src/phpvm/ext-memcached + git fetch --all --tags || exit 1 + } || { + git clone https://github.com/php-memcached-dev/php-memcached /usr/src/phpvm/ext-memcached || exit 1 + cd /usr/src/phpvm/ext-memcached + git fetch --all --tags || exit 1 + } + + # Go to the ext-memcached source + cd /usr/src/phpvm/ext-memcached + git pull + + # Compile & install ext-memcached + printf "\n" | phpize || exit 1 + printf "\n" | ./configure --disable-memcached-sasl || exit 1 + make $MAKEOPTS || exit 1 + make install || exit 1 echo "extension=memcached.so" >> /usr/local/lib/php.ini - # Add mongodb - printf "\n" | pecl install mongodb || exit 1 + # Download/update mongodb repo + [ -d "/usr/src/phpvm/ext-mongodb" ] && { + cd /usr/src/phpvm/ext-mongodb + git fetch --all --tags || exit 1 + } || { + git clone https://github.com/mongodb/mongo-php-driver /usr/src/phpvm/ext-mongodb || exit 1 + cd /usr/src/phpvm/ext-mongodb + git fetch --all --tags || exit 1 + } + + # Go to the ext-mongodb source + cd /usr/src/phpvm/ext-mongodb + git submodule update --init --recursive --force + git pull + + # Compile & install ext-mongodb + printf "\n" | phpize || exit 1 + printf "\n" | ./configure || exit 1 + make $MAKEOPTS || exit 1 + make install || exit 1 echo "extension=mongodb.so" >> /usr/local/lib/php.ini - # Add psr - printf "\n" | pecl install psr || exit 1 + # Download/update mongodb repo + [ -d "/usr/src/phpvm/ext-psr" ] && { + cd /usr/src/phpvm/ext-psr + git fetch --all --tags || exit 1 + } || { + git clone https://github.com/jbboehr/php-psr /usr/src/phpvm/ext-psr || exit 1 + cd /usr/src/phpvm/ext-psr + git fetch --all --tags || exit 1 + } + + # Go to the ext-psr source + cd /usr/src/phpvm/ext-psr + git pull + + # Compile & install ext-pr + printf "\n" | phpize || exit 1 + printf "\n" | ./configure || exit 1 + make $MAKEOPTS || exit 1 + make install || exit 1 echo "extension=psr.so" >> /usr/local/lib/php.ini # Download/update phalcon repo