2020-09-14 18:01:29 +00:00
|
|
|
#!/bin/sh -x
|
|
|
|
|
|
|
|
# platform-independent lib.sh
|
|
|
|
cd `dirname $0` || exit 1
|
|
|
|
opt_dir=`pwd`
|
|
|
|
. ./lib.sh || exit 1
|
|
|
|
|
|
|
|
# platform dependencies
|
|
|
|
shared_deps="
|
|
|
|
curl
|
|
|
|
pcre
|
|
|
|
openssl
|
2020-09-14 18:26:11 +00:00
|
|
|
gpg
|
2020-09-14 18:01:29 +00:00
|
|
|
"
|
|
|
|
brew install $shared_deps || exit 1
|
|
|
|
|
|
|
|
# build openresty
|
|
|
|
SetupOpenRestyVars || exit 1
|
|
|
|
CustomiseVars || exit 1
|
|
|
|
SetupForBuild || exit 1
|
|
|
|
ConfigureOpenResty \
|
|
|
|
--with-cc-opt="-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/" \
|
|
|
|
--with-ld-opt="-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/" || exit 1
|
|
|
|
BuildAndCleanup || exit 1
|
|
|
|
|
|
|
|
# build tor
|
|
|
|
SetupTorVars || exit 1
|
|
|
|
CustomiseVars || exit 1
|
|
|
|
SetupForBuild || exit 1
|
|
|
|
ConfigureTor || exit 1
|
|
|
|
BuildAndCleanup || exit 1
|
|
|
|
|
|
|
|
# done
|
|
|
|
exit 0
|