diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index b123edb..c806f13 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -1203,6 +1203,15 @@ AC_DEFUN([AX_ALL_BUILD_DEPEND], [ RPM_BUILD_DEPEND="${RPM_BUILD_DEPEND}, ${pkg}" ]) +# require package in .spec.in and control.in, append to runtime depends +# - parameter: +# $1 = package name +AC_DEFUN([AX_ALL_DEPEND], [ + pkg="$1" + DEB_DEPEND="${DEB_DEPEND}, ${pkg}" + RPM_DEPEND="${RPM_DEPEND}, ${pkg}" +]) + # require package in .spec.in append @ALL_BUILD_DEPEND@ to Build-Depends # - parameter: # $1 = package name diff --git a/bootstrap.sh b/bootstrap.sh index 5b0c789..dad79b5 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1606,12 +1606,12 @@ if testtag AX_USE_DEBIAN_PACKAGING; then -- @PACKAGER@ @BUILD_DATE@ EOF RUN_DEPENDS="$(if testtag AX_USE_NODEJS; then echo -n ", nodejs, npm,"; fi)" - BUILD_DEPENDS="debhelper, fakeroot, ${VCSDEPENDS_DEB} pkg-config, automake, libtool, libltdl-dev, autotools-dev, pandoc, lsb-release$(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 | qt4-dev,"; fi)" + BUILD_DEPENDS="gnupg, debhelper, fakeroot, ${VCSDEPENDS_DEB} pkg-config, automake, libtool, libltdl-dev, autotools-dev, pandoc, lsb-release$(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 | qt4-dev,"; fi)" to debian/control.in <> /etc/apt/preferences" docker exec ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences" done - for key in "${keys[@]}"; do - wget -O- "$key" \ - | docker exec -i ${DOCKER_ID} apt-key add - - done + if test -n "${keys[@]}"; then # fix dependency bug in cosmic and stretch + docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT} gnupg + for key in "${keys[@]}"; do + wget -O- "$key" \ + | docker exec -i ${DOCKER_ID} apt-key add - + done + fi for repo in "${repos[@]}"; do ifthenelse "${repo}" "apt-add-repository 'ARG'" done - - docker exec ${DOCKER_ID} apt-get update ${OPTIONS} for package in "${packages[@]}"; do ifthenelse "${package}" "apt-get install ${OPTIONS} ${PREVENT} ARG" @@ -341,3 +342,16 @@ for f in "${flags[@]}"; do done docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -t "${targets}" ${host} "${FLAGS[@]}" + +# last check: try to install built deb or rpm files (if not already cleaned up) +if test "${targets//deb/}" != "${targets}"; then + if ls *.deb > /dev/null 2> /dev/null; then + docker exec ${DOCKER_ID} bash -c "apt-get install ${OPTIONS} ${PREVENT} /workdir/*.deb" + fi +fi +if test "${targets//rpm/}" != "${targets}"; then + if ls *.rpm > /dev/null 2> /dev/null; then + docker exec ${DOCKER_ID} bash -c "${INSTALL_TOOL} /workdir/*.rpm" + fi +fi +echo "done."