diff options
-rw-r--r-- | buildtools/debian-package-skeleton.py | 2 | ||||
-rwxr-xr-x | configure | 44 | ||||
-rw-r--r-- | configure.ac | 31 |
3 files changed, 62 insertions, 15 deletions
diff --git a/buildtools/debian-package-skeleton.py b/buildtools/debian-package-skeleton.py index 224876f6..e0d0a4d6 100644 --- a/buildtools/debian-package-skeleton.py +++ b/buildtools/debian-package-skeleton.py @@ -1033,7 +1033,7 @@ export DH_VERBOSE=1 dh $@ --with python2 override_dh_auto_configure: - dh_auto_configure -- --disable-target-installation + dh_auto_configure -- --disable-target-installation --enable-python-install-layout=deb override_dh_auto_test: @true @@ -708,6 +708,7 @@ enable_ca_tools enable_rp_tools enable_target_installation enable_wsgi_daemon_mode +enable_python_install_layout enable_python enable_django enable_rpki_rtr @@ -1345,6 +1346,8 @@ Optional Features: Don't perform final target installation --enable-wsgi-daemon-mode=user:group Run the web portal as a separate process + --enable-python-install-layout=layout + Specify Python --install-layout --disable-python (Obsolete, do not use) --disable-django (Obsolete, do not use) --disable-rpki-rtr (Obsolete, do not use) @@ -2425,6 +2428,13 @@ else enable_wsgi_daemon_mode=no fi +# Check whether --enable-python_install_layout was given. +if test "${enable_python_install_layout+set}" = set; then : + enableval=$enable_python_install_layout; +else + enable_python_install_layout=auto +fi + @@ -4910,26 +4920,44 @@ fi if test $build_ca_tools = yes then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need to tell distutils to use Debian installation layout" >&5 -$as_echo_n "checking whether we need to tell distutils to use Debian installation layout... " >&6; } - use_debian_layout=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need to tell distutils to use a particular installation layout" >&5 +$as_echo_n "checking whether we need to tell distutils to use a particular installation layout... " >&6; } + looks_like_debian=no if test -x /usr/bin/lsb_release then case `/usr/bin/lsb_release -is` in Debian|Ubuntu) - use_debian_layout=yes + looks_like_debian=yes ;; esac fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_debian_layout" >&5 -$as_echo "$use_debian_layout" >&6; } - if test $use_debian_layout = yes + if test $looks_like_debian = yes + then + install_layout="deb" + else + install_layout="unix" + fi + case $enable_python_install_layout in + yes|no) + use_install_layout=$enable_python_install_layout + ;; + auto) + use_install_layout=$looks_like_debian + ;; + *) + use_install_layout=yes + install_layout="$enable_python_install_layout" + ;; + esac + if test $use_install_layout = yes then - SETUP_PY_INSTALL_LAYOUT='--install-layout=deb' + SETUP_PY_INSTALL_LAYOUT="--install-layout=$install_layout" else SETUP_PY_INSTALL_LAYOUT='' fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_install_layout $SETUP_PY_INSTALL_LAYOUT" >&5 +$as_echo "$use_install_layout $SETUP_PY_INSTALL_LAYOUT" >&6; } fi diff --git a/configure.ac b/configure.ac index fd489467..00731807 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,7 @@ AC_ARG_ENABLE([ca_tools], [AS_HELP_STRING([--disable-ca-tools], [Don't buil AC_ARG_ENABLE([rp_tools], [AS_HELP_STRING([--disable-rp-tools], [Don't build any of the relying party tools])], [], [enable_rp_tools=yes]) AC_ARG_ENABLE([target_installation], [AS_HELP_STRING([--disable-target-installation], [Don't perform final target installation])], [], [enable_target_installation=yes]) AC_ARG_ENABLE([wsgi_daemon_mode], [AS_HELP_STRING([--enable-wsgi-daemon-mode=user[:group]], [Run the web portal as a separate process])], [], [enable_wsgi_daemon_mode=no]) +AC_ARG_ENABLE([python_install_layout], [AS_HELP_STRING([--enable-python-install-layout=layout], [Specify Python --install-layout])], [], [enable_python_install_layout=auto]) AC_ARG_VAR([RCYNIC_DIR], [Where to put output files from rcynic and rtr-origin; also controls jail location for --enable-rcynic-jail]) @@ -577,24 +578,42 @@ fi if test $build_ca_tools = yes then - AC_MSG_CHECKING([whether we need to tell distutils to use Debian installation layout]) - use_debian_layout=no + AC_MSG_CHECKING([whether we need to tell distutils to use a particular installation layout]) + looks_like_debian=no if test -x /usr/bin/lsb_release then case `/usr/bin/lsb_release -is` in Debian|Ubuntu) - use_debian_layout=yes + looks_like_debian=yes ;; esac fi - AC_MSG_RESULT([$use_debian_layout]) - if test $use_debian_layout = yes + if test $looks_like_debian = yes then - SETUP_PY_INSTALL_LAYOUT='--install-layout=deb' + install_layout="deb" + else + install_layout="unix" + fi + case $enable_python_install_layout in + yes|no) + use_install_layout=$enable_python_install_layout + ;; + auto) + use_install_layout=$looks_like_debian + ;; + *) + use_install_layout=yes + install_layout="$enable_python_install_layout" + ;; + esac + if test $use_install_layout = yes + then + SETUP_PY_INSTALL_LAYOUT="--install-layout=$install_layout" else SETUP_PY_INSTALL_LAYOUT='' fi + AC_MSG_RESULT([$use_install_layout $SETUP_PY_INSTALL_LAYOUT]) AC_SUBST(SETUP_PY_INSTALL_LAYOUT) fi |