improved build, so that build in docker does not depend on the hosting system

master
Marc Wäckerlin 8 years ago
parent 86cc10fc11
commit 9e29ffddb4
  1. 2
      bootstrap.sh
  2. 3
      build-in-docker.sh
  3. 7
      resolve-rpmbuilddeps.sh

@ -1463,7 +1463,7 @@ if testtag AX_USE_DEBIAN_PACKAGING; then
-- @PACKAGER@ @BUILD_DATE@
EOF
BUILD_DEPENDS="debhelper, ${VCSDEPENDS} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release, fakeroot, default-jre-headless|default-jre, $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen, default-jre-headless|default-jre"; fi; if testtag AX_USE_PERLDOC; then echo -n ", libpod-tree-perl"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | libqt4-core | libqtcore4, qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)"
BUILD_DEPENDS="debhelper, ${VCSDEPENDS} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release, fakeroot, $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen, default-jre-headless|default-jre"; fi; if testtag AX_USE_PERLDOC; then echo -n ", libpod-tree-perl"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | libqt4-core | libqtcore4, qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)"
to debian/control.in <<EOF
Source: @PACKAGE_NAME@
Priority: extra

@ -10,7 +10,7 @@ mode="deb"
img="ubuntu:latest"
repos=()
keys=()
envs=("-e HOME=/home/$(id -un)" "-e TERM=xterm")
envs=("-e HOME=/home/$(id -un)" "-e TERM=xterm" "-e DEBIAN_FRONTEND=noninteractive" "-e DEBCONF_NONINTERACTIVE_SEEN=true")
dirs=("-v $(pwd):/workdir" "-v ${HOME}/.gnupg:/home/$(id -un)/.gnupg:ro")
packages=()
targets="all check distcheck"
@ -243,7 +243,6 @@ case $mode in
docker exec ${DOCKER_ID} ./resolve-debbuilddeps.sh
;;
(rpm|yum|dnf|zypper)
./bootstrap.sh -t dist
docker exec ${DOCKER_ID} ./resolve-rpmbuilddeps.sh || true
;;
esac

@ -15,13 +15,16 @@ SCHROOTNAME="$1"
PACKAGE_NAME=$(sed -n 's/^ *m4_define(x_package_name, \(.*\)).*/\1/p' configure.ac)
if test -n "${SCHROOTNAME}"; then
schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} install -y rpm-build
schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} install -y rpm-build automake
autoconf
schroot -c ${SCHROOTNAME} -u root -- ./bootstrap.sh -c
FILES=$(LANG= schroot -c ${SCHROOTNAME} -- rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p')
if test -n "${FILES}"; then
schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} install -y ${FILES}
fi
else
${INSTALL_TOOL} install -y rpm-build
${INSTALL_TOOL} install -y rpm-build automake
autoconf
FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p')
if test -n "${FILES}"; then
${INSTALL_TOOL} install -y ${FILES}

Loading…
Cancel
Save