improved nodejs build on old systems

master
Marc Wäckerlin 8 years ago
parent d8ab42d4dc
commit e632f698b7
  1. 26
      scripts/ax_init_standard_project.m4
  2. 10
      scripts/bootstrap.sh
  3. 3
      scripts/build-in-docker.sh

@ -443,8 +443,23 @@ maintainer-clean-example-targets:
EOF
])
# use this in configure.ac to support C++ examples
# use this in configure.ac to support NodeJS
AC_DEFUN([AX_USE_NODEJS], [
AC_PATH_PROG(ANDROID, [android], [0],
[${PATH}${PATH_SEPARATOR}${ANDROID_HOME}/tools])
AC_CONFIG_FILES([nodejs/package.json])
AC_CONFIG_FILES([nodejs/makefile])
AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-nodejs-targets], [nodejs/makefile.in])
test -f nodejs/makefile.in && cat >> nodejs/makefile.in <<EOF
#### Begin: Appended by $0
maintainer-clean-nodejs-targets:
-rm makefile.in
#### End: $0
EOF
])
# use this in configure.ac to support Cordova
AC_DEFUN([AX_USE_CORDOVA], [
AC_PATH_PROG(ANDROID, [android], [0],
[${PATH}${PATH_SEPARATOR}${ANDROID_HOME}/tools])
AC_PATH_PROG(CORDOVA, [cordova], [0],
@ -457,14 +472,13 @@ AC_DEFUN([AX_USE_NODEJS], [
fi
AM_CONDITIONAL(HAVE_CORDOVA, [test ${CORDOVA} != 0 -a ${ANDROID} != 0])
AX_SUBST(CORDOVA)
AC_CONFIG_FILES([nodejs/package.json])
AC_CONFIG_FILES([nodejs/makefile])
AC_CONFIG_FILES([cordova/makefile])
AC_CONFIG_FILES([cordova/config.xml])
AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-example-targets], [examples/makefile.in])
test -f examples/makefile.in && cat >> examples/makefile.in <<EOF
EOF
AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-cordova-targets], [cordova/makefile.in])
test -f cordova/makefile.in && cat >> cordova/makefile.in <<EOF
#### Begin: Appended by $0
maintainer-clean-example-targets:
maintainer-clean-cordova-targets:
-rm makefile.in
#### End: $0
EOF

@ -857,6 +857,13 @@ ${HEADER}dist_bin_SCRIPTS =
MAINTAINERCLEANFILES = makefile.in
EOF
if testtag AX_USE_NODEJS; then
checkdir nodejs
checkdir nodejs/public
checkdir nodejs/public/images
checkdir nodejs/etc
checkdir nodejs/etc/systemd
fi
to --condition AX_USE_NODEJS nodejs/makefile.am <<EOF
${HEADER}EXTRA_DIST = @PACKAGE_NAME@.js package.json.in public routes sockets views
@ -1063,9 +1070,6 @@ Restart=on-abort
[Install]
WantedBy=multi-user.target
EOF
if testtag AX_USE_NODEJS; then
checkdir nodejs/public/images
fi
to --condition AX_USE_NODEJS nodejs/public/javascripts/${PACKAGE_NAME}.js <<EOF
${CHEADER}var socket = null;
function init() {

@ -192,12 +192,13 @@ function ifthenelse() {
set -x
docker pull $img
DOCKER_ID=$(docker create -d ${dirs[@]} ${envs[@]} -e HOME="${HOME}" -w /workdir $img sleep infinity)
DOCKER_ID=$(docker create ${dirs[@]} ${envs[@]} -e HOME="${HOME}" -w /workdir $img sleep infinity)
trap 'traperror '"${DOCKER_ID}"' "$? ${PIPESTATUS[@]}" $LINENO $BASH_LINENO "$BASH_COMMAND" "${FUNCNAME[@]}" "${FUNCTION}"' SIGINT INT TERM EXIT
if ! [[ $arch =~ $myarch ]]; then
docker cp "/usr/bin/qemu-${arch}-static" "${DOCKER_ID}:/usr/bin/qemu-${arch}-static"
fi
docker start "${DOCKER_ID}"
docker exec ${DOCKER_ID} useradd -u$(id -u) -m -d"${HOME}" $(id -un)
case $mode in
(apt)
OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends'

Loading…
Cancel
Save