From b8b9bcb477d1b4e4d02c9cf4f98ed8e6a4138526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 20 Jan 2016 15:56:16 +0000 Subject: [PATCH] build improvements --- scripts/ax_init_standard_project.m4 | 8 +++++++- scripts/build-in-docker.sh | 24 +++++++++++++++--------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/scripts/ax_init_standard_project.m4 b/scripts/ax_init_standard_project.m4 index a7e207d..d8fe5c2 100644 --- a/scripts/ax_init_standard_project.m4 +++ b/scripts/ax_init_standard_project.m4 @@ -178,8 +178,14 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ PACKAGE_LOGO="${PACKAGE_NAME}-logo.png" fi AX_SUBST(PACKAGE_LOGO) - if test -f "${PACKAGE_NAME}-icon.png"; then + if test -f "${PACKAGE_NAME}-icon.svg"; then + PACKAGE_ICON="${PACKAGE_NAME}-icon.svg" + elif test -f "${PACKAGE_NAME}-icon.png"; then PACKAGE_ICON="${PACKAGE_NAME}-icon.png" + elif test -f "${PACKAGE_NAME}.svg"; then + PACKAGE_ICON="${PACKAGE_NAME}.svg" + elif test -f "${PACKAGE_NAME}.png"; then + PACKAGE_ICON="${PACKAGE_NAME}.png" fi AX_SUBST(PACKAGE_ICON) diff --git a/scripts/build-in-docker.sh b/scripts/build-in-docker.sh index c7cf8e0..7ba0bc5 100755 --- a/scripts/build-in-docker.sh +++ b/scripts/build-in-docker.sh @@ -120,7 +120,7 @@ function traperror() { fi if [ "$wait" -eq 1 ]; then echo " ... now you can access the docker container:" - echo " docker exec -u $(id -u) ${DOCKER_ID} -it bash" + echo " docker exec -u $(id -u) -it ${DOCKER_ID} bash" echo -n " ... press enter to cleanup: " read fi @@ -133,7 +133,7 @@ function traperror() { done if [ "$wait" -eq 1 ]; then echo " ... now you can access the docker container:" - echo " docker exec -u $(id -u) ${DOCKER_ID} -it bash" + echo " docker exec -u $(id -u) -it ${DOCKER_ID} bash" echo -n " ... press enter to cleanup: " read fi @@ -167,14 +167,20 @@ function ifthenelse() { set -x +OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends' docker pull $img DOCKER_ID=$(docker run -d ${dirs[@]} ${envs[@]} -w /workdir $img sleep infinity) trap 'traperror '"${DOCKER_ID}"' "$? ${PIPESTATUS[@]}" $LINENO $BASH_LINENO "$BASH_COMMAND" "${FUNCNAME[@]}" "${FUNCTION}"' SIGINT INT TERM EXIT -docker exec ${DOCKER_ID} apt-get update -docker exec ${DOCKER_ID} apt-get upgrade -y -docker exec ${DOCKER_ID} apt-get install -y python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release || \ - docker exec ${DOCKER_ID} apt-get install -y software-properties-common apt-transport-https dpkg-dev lsb-release || \ - docker exec ${DOCKER_ID} apt-get install -y python-software-properties apt-transport-https dpkg-dev lsb-release; +for f in 'libpam-systemd:amd64' 'policykit*' 'colord'; do + docker exec -it ${DOCKER_ID} bash -c "echo 'Package: $f' >> /etc/apt/preferences" + docker exec -it ${DOCKER_ID} bash -c "echo 'Pin-Priority: -100' >> /etc/apt/preferences" + docker exec -it ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences" +done +docker exec ${DOCKER_ID} apt-get update ${OPTIONS} +docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS} +docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release || \ + docker exec ${DOCKER_ID} apt-get install ${OPTIONS} software-properties-common apt-transport-https dpkg-dev lsb-release || \ + docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties apt-transport-https dpkg-dev lsb-release; for repo in "${repos[@]}"; do ifthenelse "${repo}" "apt-add-repository ARG" done @@ -182,9 +188,9 @@ for key in "${keys[@]}"; do wget -O- "$key" \ | docker exec -i ${DOCKER_ID} apt-key add - done -docker exec ${DOCKER_ID} apt-get update +docker exec ${DOCKER_ID} apt-get update ${OPTIONS} for package in "${packages[@]}"; do - ifthenelse "${package}" "apt-get install -y --force-yes ARG" + ifthenelse "${package}" "apt-get install ${OPTIONS} ARG" done for command in "${commands[@]}"; do ifthenelse "${command}" "ARG"