From 3a84d00defb149204e301626f4a5ec2d6e9ea82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Mon, 10 Sep 2018 11:28:28 +0200 Subject: [PATCH] improve logo-detection; improve docker buil target detection; fixed dependency-bug in ubuntu cosmic --- ax_init_standard_project.m4 | 28 ++++++++++++++----------- bootstrap.sh | 14 ++++++------- scripts/bootstrap.sh | 2 +- scripts/build-in-docker.sh | 35 ++++++++++++++++++++++---------- scripts/mac-create-app-bundle.sh | 11 +++++----- 5 files changed, 53 insertions(+), 37 deletions(-) diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index 864c92e..bf871b9 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -248,18 +248,22 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ PACKAGE_DESKTOP="${PACKAGE_NAME}.desktop" fi AX_SUBST(PACKAGE_DESKTOP) - if test -f "${PACKAGE_NAME}-logo.png"; then + if test -z "$PACKAGE_LOGO" -a -f "${PACKAGE_NAME}-logo.png"; then PACKAGE_LOGO="${PACKAGE_NAME}-logo.png" fi AX_SUBST(PACKAGE_LOGO) - 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" + if test -z "$PACKAGE_ICON"; 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" + elif test -f "icon.png"; then + PACKAGE_ICON="icon.png" + fi fi AX_SUBST(PACKAGE_ICON) @@ -320,9 +324,9 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-standard-project-targets], [makefile.in]) test -f makefile.in && cat >> makefile.in < /dev/null 2>&1; then docker exec ${DOCKER_ID} useradd -m -u $(id -u) -g $(id -g) -d"${HOME}" $(id -un) fi docker exec ${DOCKER_ID} chown $(id -u):$(id -g) "${HOME}" -case $mode in +if test -z "$mode"; then + case "$targets" in + (*deb*) mode=deb;; + (*rpm*) mode=rpm;; + (*) case "$img" in + (*ubuntu*|*debian*|*mint*) mode=deb;; + (*fedora*|*centos*|*mageia*) mode=rpm;; + (*mingw*|*win*) mode=win;; + (*) mode=deb;; + esac;; + esac +fi +case "$mode" in (deb|apt|win) + OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends' + PREVENT='libpam-systemd policykit.* colord dconf-service' + docker exec ${DOCKER_ID} apt-get update ${OPTIONS} + docker exec ${DOCKER_ID} apt-mark hold ${PREVENT} + docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS} + docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ + docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ + docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties apt-transport-https dpkg-dev lsb-release wget; if [[ "${img}" =~ "ubuntu" ]]; then + docker exec ${DOCKER_ID} apt-get install ${OPTIONS} locales gnupg docker exec ${DOCKER_ID} locale-gen ${LANG} docker exec ${DOCKER_ID} update-locale LANG=${LANG} fi - OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends' - PREVENT='libpam-systemd policykit.* colord dconf-service' for f in ${PREVENT}; do docker exec ${DOCKER_ID} bash -c "echo 'Package: ${f}' >> /etc/apt/preferences" docker exec ${DOCKER_ID} bash -c "echo 'Pin-Priority: -100' >> /etc/apt/preferences" docker exec ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences" done - docker exec ${DOCKER_ID} apt-get update ${OPTIONS} - docker exec ${DOCKER_ID} apt-mark hold ${PREVENT} - docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS} - docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ - docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- software-properties-common apt-transport-https dpkg-dev lsb-release wget || \ - docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties apt-transport-https dpkg-dev lsb-release wget; for key in "${keys[@]}"; do wget -O- "$key" \ | docker exec -i ${DOCKER_ID} apt-key add - @@ -281,7 +294,7 @@ case $mode in ;; (rpm|yum|dnf|zypper|urpmi) if [[ "$img" =~ "centos" ]]; then - docker exec ${DOCKER_ID} yum install -y redhat-lsb + docker exec ${DOCKER_ID} yum install -y redhat-lsb epel-release docker exec -i ${DOCKER_ID} bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo' < ${apptarget}/Contents/Info.plist < - + CFBundleIdentifier ${project} CFBundleExecutable - ${executablefile##/} + ${executablefile##*/} EOF