Skip to content

Instantly share code, notes, and snippets.

@samayo
Forked from kelunik/php.sh
Last active August 28, 2015 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samayo/5fd5e18b87272cfd2a4a to your computer and use it in GitHub Desktop.
Save samayo/5fd5e18b87272cfd2a4a to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
set -x
if [ $1 == "master" ]
then
wget https://github.com/php/php-src/archive/master.zip -q -O master.zip
rm -rf php-src-master
unzip -q master.zip
rm -rf release
mv php-src-master release
else
wget https://github.com/php/php-src/archive/php-$1.zip -q -O $1.zip
rm -rf php-src-php-$1
unzip -q $1.zip
rm -rf release
mv php-src-php-$1 release
fi
cd release
./buildconf --force
echo "buildconf successful"
./configure \
--prefix=$HOME/.phpenv/versions/$1 \
--with-config-file-path=/etc/php \
--enable-phpdbg \
--with-libdir=/lib/x86_64-linux-gnu \
--disable-all \
--with-openssl \
--with-zlib \
--with-curl \
--with-xsl \
--enable-pdo \
--enable-sockets \
--enable-mbstring \
--enable-phar \
--enable-ctype \
--enable-hash \
--enable-json \
--enable-filter \
--enable-zip \
--enable-libxml \
--enable-simplexml \
--enable-xmlreader \
--enable-dom \
--enable-tokenizer \
--enable-posix \
--enable-pcntl
make install -j4 > /dev/null
cd ..
rm -rf release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment