diff --git a/scripts/Dockerfile b/scripts/Dockerfile index ff6b04445879c51d960f988c78cc1202de213e58..d32e4092acbbd9d54fbd1bbfb91628d37c3cb094 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -3,11 +3,11 @@ MAINTAINER Marek Vavrusa <marek.vavrusa@nic.cz> # Environment ENV THREADS 4 -ENV BUILD_PKGS git-core make gcc libtool autoconf pkg-config cmake libgnutls28-dev libjansson-dev -ENV RUN_PKGS libgnutls-deb0-28 libjansson4 +ENV BUILD_PKGS git-core make gcc libtool autoconf pkg-config cmake libgnutls28-dev libjansson-dev liblua5.2-dev +ENV RUN_PKGS libgnutls-deb0-28 libjansson4 liblua5.2-0 lua5.2 ENV PREFIX /usr/local ENV BUILD_DIR /tmp/build -ENV BUILD_IGNORE gmp nettle jansson gnutls +ENV BUILD_IGNORE gmp nettle jansson gnutls lua # Expose port EXPOSE 53 diff --git a/scripts/bootstrap-depends.sh b/scripts/bootstrap-depends.sh index f066b47a63a1cbcf2088166cf59adaaafdaa5db2..de9fe145e081514d01556a30538c50b5774d58f8 100755 --- a/scripts/bootstrap-depends.sh +++ b/scripts/bootstrap-depends.sh @@ -15,6 +15,8 @@ NETTLE_TAG="2.7.1" NETTLE_URL="https://ftp.gnu.org/gnu/nettle/nettle-${NETTLE_TAG}.tar.gz" GNUTLS_TAG="3.3.12" GNUTLS_URL="ftp://ftp.gnutls.org/gcrypt/gnutls/v3.3/gnutls-${GNUTLS_TAG}.tar.xz" +LUA_TAG="5.2.3" +LUA_URL="http://www.lua.org/ftp/lua-${LUA_TAG}.tar.gz" # prepare install prefix PREFIX=${1}; [ -z ${PREFIX} ] && export PREFIX="${HOME}/.local" @@ -47,14 +49,18 @@ function build_pkg { if [ -f CMakeLists.txt ]; then [ -e cmake-build ] && rm -rf cmake-build; mkdir cmake-build; cd cmake-build cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} .. - else + make ${MAKEOPTS} + make install + elif [ -f configure.ac ]; then if [ ! -e ./configure ]; then [ -e autogen.sh ] && sh autogen.sh || autoreconf -if fi ./configure --prefix=${PREFIX} --enable-shared $* + make ${MAKEOPTS} + make install + else + make $* fi - make ${MAKEOPTS} - make install } function pkg { @@ -99,6 +105,21 @@ pkg libknot ${KNOT_URL} ${KNOT_TAG} include/libknot \ pkg cmocka ${CMOCKA_URL} ${CMOCKA_TAG} include/cmocka.h # libuv pkg libuv ${LIBUV_URL} ${LIBUV_TAG} include/uv.h --disable-static +# lua +pkg lua ${LUA_URL} ${LUA_TAG} include/lua.h generic install INSTALL_TOP=${PREFIX} +cat > ${PREFIX}/lib/pkgconfig/lua.pc << EOF +prefix=${PREFIX} +exec_prefix=\${prefix} +libdir=\${exec_prefix}/lib +includedir=\${prefix}/include + +Name: Lua +Description: An Extensible Extension Language +Version: ${LUA_TAG} +Requires: +Libs: -L\${libdir} -llua -lm +Cflags: -I\${includedir} +EOF # remove on successful build rm -rf ${BUILD_DIR}