forked from stechstudio/libvips-lambda
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild-phpvips.sh
More file actions
executable file
·38 lines (34 loc) · 936 Bytes
/
build-phpvips.sh
File metadata and controls
executable file
·38 lines (34 loc) · 936 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
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
set -e
if [ $# -lt 3 ]; then
echo
echo "Usage: $0 VERSION_VIPS VERSION_PHP VERSION_PHPVIPS"
echo "Build shared libraries for libvips and its dependencies via containers"
echo "Then compile PHP against the same dependencies and build php-vips-ext"
echo
echo "Please specify the libvips VERSION, e.g. 8.5.6"
echo "Please specify the PHP VERSION, e.g. 7.1.6"
echo "Please specify the php-vips-ext VERSION, e.g. 1.0.7"
echo
exit 1
fi
VERSION_VIPS="$1"
VERSION_PHP="$2"
VERSION_PHPVIPS="$3"
# Is docker available?
if ! type docker >/dev/null; then
echo "Please install docker"
exit 1
fi
echo "Building ..."
docker build -t dev-lambda amazonlinux
docker \
run \
--rm \
-e "VERSION_VIPS=${VERSION_VIPS}" \
-e "VERSION_PHP=${VERSION_PHP}" \
-e "VERSION_PHPVIPS=${VERSION_PHPVIPS}" \
-e "BUILD_PHP=YES" \
-v $PWD:/packaging \
dev-lambda \
sh -c "/packaging/build/vips.sh"