Skip to content

Commit

Permalink
symlink lua-platform-path for all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
toolboc committed Jun 4, 2018
1 parent af5c379 commit cf9ce3d
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions images/nginx/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,41 @@ clean-install \
libcurl4-openssl-dev \
procps \
git g++ pkgconf flex bison doxygen libyajl-dev liblmdb-dev libtool dh-autoreconf libxml2 libpcre++-dev libxml2-dev \
lua-cjson \
python \
luarocks \
|| exit 1

ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/lib/liblua.so
if [[ ${ARCH} == "x86_64" ]]; then
ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/lib/liblua.so
ln -s /usr/lib/x86_64-linux-gnu /usr/lib/lua-platform-path
fi

mkdir -p /etc/nginx
if [[ ${ARCH} == "armv7l" ]]; then
ln -s /usr/lib/arm-linux-gnueabihf/liblua5.1.so /usr/lib/liblua.so
ln -s /usr/lib/arm-linux-gnueabihf /usr/lib/lua-platform-path
fi

if [[ ${ARCH} == "aarch64" ]]; then
ln -s /usr/lib/aarch64-linux-gnu/liblua5.1.so /usr/lib/liblua.so
ln -s /usr/lib/aarch64-linux-gnu /usr/lib/lua-platform-path
fi

if [[ ${ARCH} == "ppc64le" ]]; then
ln -s /usr/lib/powerpc64le-linux-gnu/liblua5.1.so /usr/lib/liblua.so
ln -s /usr/lib/powerpc64le-linux-gnu /usr/lib/lua-platform-path
fi

if [[ ${ARCH} == "s390x" ]]; then
ln -s /usr/lib/s390x-linux-gnu/liblua5.1.so /usr/lib/liblua.so
ln -s /usr/lib/s390x-linux-gnu /usr/lib/lua-platform-path
# avoid error:
# git: ../nptl/pthread_mutex_lock.c:81: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
git config --global pack.threads "1"
fi

mkdir -p /etc/nginx

# Get the GeoIP data
GEOIP_FOLDER=/etc/nginx/geoip
mkdir -p $GEOIP_FOLDER
Expand Down Expand Up @@ -208,8 +229,6 @@ if [[ ${ARCH} == "x86_64" ]]; then
luarocks install lrexlib-pcre 2.7.2-1
fi

luarocks install lua-cjson 2.1.0.6-1

# luajit is not available on ppc64le and s390x
if [[ (${ARCH} != "ppc64le") && (${ARCH} != "s390x") ]]; then
cd "$BUILD_PATH/luajit2-2.1-20180420"
Expand Down

0 comments on commit cf9ce3d

Please sign in to comment.