forked from heroku/heroku-buildpack-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.DS_Store | ||
support/build/*/builds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
# fail hard | ||
set -o pipefail | ||
# fail harder | ||
set -eux | ||
|
||
# | ||
#./configure --prefix=/tmp/foo1 | ||
#https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz | ||
# | ||
|
||
PREFIX=/app/.heroku/php | ||
mkdir -p $PREFIX | ||
|
||
curl -LO ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz | ||
tar xzf cyrus-sasl-2.1.26.tar.gz | ||
pushd cyrus-sasl-2.1.26 | ||
./configure --prefix=$PREFIX | ||
make | ||
make install | ||
popd | ||
|
||
# Take care of vendoring | ||
dep_version=${VERSION:-1.0.16} | ||
dep_dirname=libmemcached-${dep_version} | ||
dep_archive_name=${dep_dirname}.tar.gz | ||
|
||
curl -LO https://launchpad.net/libmemcached/1.0/${dep_version}/+download/${dep_archive_name} | ||
|
||
tar xzf $dep_archive_name | ||
pushd $dep_dirname | ||
CPPFLAGS=-I$PREFIX/include LDFLAGS=-L$PREFIX/lib ./configure --prefix=$PREFIX --without-memcached | ||
make | ||
make install | ||
popd | ||
|
||
mv $PREFIX/* $2/ | ||
|
||
echo "Done packaging $dep_dirname" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
#!/bin/bash | ||
|
||
# fail hard | ||
set -o pipefail | ||
# fail harder | ||
set -eux | ||
|
||
PREFIX=/app/.heroku/php | ||
mkdir -p $PREFIX/bin | ||
export PATH=$PREFIX/bin:$PATH | ||
|
||
curl -L https://dl.dropboxusercontent.com/u/26887866/heroku/zlib-1.2.8.tgz | tar xz -C $PREFIX | ||
|
||
# Take care of vendoring | ||
dep_version=${VERSION:-5.5.10} | ||
dep_dirname=php-$dep_version | ||
dep_archive_name=$dep_dirname.tar.bz2 | ||
|
||
# Download PHP if necessary. | ||
if [ ! -f $dep_archive_name ] | ||
then | ||
curl -Lo $dep_archive_name http://us1.php.net/get/$dep_archive_name/from/www.php.net/mirror | ||
fi | ||
|
||
|
||
|
||
# fetch mcrypt | ||
if [ -z MCRYPT_URL ] | ||
then | ||
MCRYPT_URL="https://heroku-buildpack-php.s3.amazonaws.com/mcrypt-2.5.8-2.tar.gz" | ||
fi | ||
#curl --silent --max-time 60 --location "$MCRYPT_URL" | tar xz | ||
|
||
# Clean and extract PHP. | ||
rm -rf $dep_dirname | ||
tar jxf $dep_archive_name | ||
|
||
# Compile PHP | ||
pushd $dep_dirname | ||
./configure \ | ||
--prefix=$PREFIX \ | ||
--with-config-file-path=/app/.heroku/php/etc \ | ||
--with-config-file-scan-dir=/app/.heroku/php/etc/php/conf.d \ | ||
--with-openssl \ | ||
--enable-fpm \ | ||
--enable-soap=shared \ | ||
--enable-sockets \ | ||
--enable-zip \ | ||
--with-zlib=$PREFIX \ | ||
--with-pgsql \ | ||
--with-pdo-pgsql | ||
make -s | ||
make install -s | ||
popd | ||
|
||
curl -L https://dl.dropboxusercontent.com/u/26887866/heroku/libmemcached-1.0.16.tgz | tar xz -C $PREFIX | ||
curl -L https://github.com/php-memcached-dev/php-memcached/archive/2.2.0b1.tar.gz | tar xz | ||
pushd php-memcached-2.2.0b1 | ||
phpize | ||
./configure \ | ||
--enable-memcached \ | ||
--with-libmemcached-dir=$PREFIX | ||
make -s | ||
make install -s | ||
popd | ||
|
||
# Copy in MySQL client library. | ||
# mkdir -p $PREFIX/lib/phpls | ||
# cp /usr/lib/libmysqlclient.so.16 $PREFIX/lib/php | ||
|
||
# $PATH manipulation Necessary for 'pecl install', which relies on | ||
# PHP binaries relative to $PATH. | ||
|
||
$PREFIX/bin/pecl channel-update pecl.php.net | ||
|
||
# bundle composer | ||
curl -sS https://getcomposer.org/installer | php -- --install-dir=$PREFIX/bin | ||
mv $PREFIX/bin/composer.phar $PREFIX/bin/composer | ||
|
||
# Use defaults for apc build prompts. | ||
# yes '' | $PREFIX/bin/pecl install apc | ||
|
||
# echo $dep_version > $PREFIX/.heroku/dep_version | ||
|
||
mv $PREFIX/* $2/ | ||
|
||
echo "Done building $dep_dirname" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# fail hard | ||
set -o pipefail | ||
# fail harder | ||
set -eux | ||
|
||
PREFIX=/app/.heroku/php | ||
mkdir -p $PREFIX | ||
|
||
# Take care of vendoring | ||
dep_version=${VERSION:-1.2.8} | ||
dep_dirname=zlib-${dep_version} | ||
dep_archive_name=${dep_dirname}.tar.gz | ||
|
||
curl -Lo $dep_archive_name http://zlib.net/${dep_archive_name} | ||
|
||
tar xzf $dep_archive_name | ||
pushd $dep_dirname | ||
./configure --prefix=$PREFIX | ||
make | ||
make install | ||
popd | ||
|
||
mv $PREFIX/* $2/ | ||
|
||
echo "Done packaging $dep_dirname" |