diff --git a/build.py b/build.py index f0adde1d1733c348abd18fd8568c37275bf3d5a9..7e86548b8aa3bd2add50fa2541678136c21b6b5f 100755 --- a/build.py +++ b/build.py @@ -381,6 +381,8 @@ def run_install(args): install_args.append('-u') if args.debug: install_args.append('-d') + if args.no_libwrap: + install_args.append('-W') if args.distribution == OSX_DISTRIBUTION_NAME: # The `universal_newlines` parameter has been renamed to `text` in @@ -647,6 +649,9 @@ def parse_args(): help='Build the Qt client with the Qt path supplied') ap.add_argument('--qtver', default=QT5_VERSION, help='Sets the Qt version to build with') + ap.add_argument('--no-libwrap', dest='no_libwrap', + default=False, action='store_true', + help='Disable libwrap. Also set --disable-shared option to daemon configure') dist = choose_distribution() diff --git a/scripts/install.sh b/scripts/install.sh index b053090e46a40843a51ff3e1942c5b67bcd6e8af..c32da1185e7a424b87f8462885fdadb35a65e171 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Build and install to a local prefix under this repository. +export OSTYPE # Flags: @@ -9,6 +10,7 @@ # -c: client to build # -p: number of processors to use # -u: disable use of privileges (sudo) during install + # -W: disable libwrap and shared library set -ex @@ -23,7 +25,9 @@ qt5ver='' qt5path='' proc='1' priv_install=true -while getopts gsc:dq:Q:P:p:u OPT; do +enable_libwrap=true + +while getopts gsc:dq:Q:P:p:uW OPT; do case "$OPT" in g) global='true' @@ -52,6 +56,9 @@ while getopts gsc:dq:Q:P:p:u OPT; do u) priv_install='false' ;; + W) + enable_libwrap='false' + ;; \?) exit 1 ;; @@ -91,7 +98,13 @@ mkdir -p contrib/native ../bootstrap ${prefix:+"--prefix=$prefix"} make -j"${proc}" ) - +# Disable shared if requested +if [[ "$OSTYPE" != "darwin"* ]]; then + # Keep the shared libaries on MAC OSX. + if [ "${enable_libwrap}" == "false" ]; then + CONFIGURE_FLAGS+=( --disable-shared) + fi +fi # Build the daemon itself. test -f configure || ./autogen.sh @@ -138,7 +151,7 @@ lrc_cmake_flags=(-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" -DCMAKE_BUILD_TYPE=Debug -DQT5_VER="${qt5ver}" -DQT5_PATH="${qt5path}" - -DENABLE_LIBWRAP=true + -DENABLE_LIBWRAP="${enable_libwrap}" $static) if [ "${global}" = "true" ]; then lrc_cmake_flags+=(${prefix:+"-DCMAKE_INSTALL_PREFIX=$prefix"})