-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathmemcached
More file actions
executable file
·28 lines (21 loc) · 912 Bytes
/
memcached
File metadata and controls
executable file
·28 lines (21 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
set -e
if [ -n "$DEBUG" ]; then
set -x
fi
# $memcached_version, $libmemcached_version, $PREFIX and $EXT_DIR are loaded from versions.sh
source "/buildpack/conf/versions.sh"
curl --location "https://github.com/php-memcached-dev/php-memcached/archive/v${memcached_version}.tar.gz" \
| tar --extract --gzip --verbose
mkdir -p /app/vendor/libmemcached
curl "${PHP_BASE_URL}/package/libmemcached-${libmemcached_version}.tgz" \
| tar --extract --gzip --verbose --directory=/app/vendor/libmemcached
cd php-memcached-${memcached_version}
/app/vendor/php/bin/phpize
./configure --with-php-config=/app/vendor/php/bin/php-config \
--disable-memcached-sasl \
--with-libmemcached-dir=/app/vendor/libmemcached \
--enable-memcached
make
cp modules/memcached.so "$EXT_DIR/memcached.so"
echo "extension=memcached.so" > "$PREFIX/etc/conf.d/memcached.ini"