improved build, so that build in docker does not depend on the hosting system
This commit is contained in:
		@@ -1463,7 +1463,7 @@ if testtag AX_USE_DEBIAN_PACKAGING; then
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 -- @PACKAGER@  @BUILD_DATE@
 | 
					 -- @PACKAGER@  @BUILD_DATE@
 | 
				
			||||||
EOF
 | 
					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
 | 
					    to debian/control.in <<EOF
 | 
				
			||||||
Source: @PACKAGE_NAME@
 | 
					Source: @PACKAGE_NAME@
 | 
				
			||||||
Priority: extra
 | 
					Priority: extra
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,7 @@ mode="deb"
 | 
				
			|||||||
img="ubuntu:latest"
 | 
					img="ubuntu:latest"
 | 
				
			||||||
repos=()
 | 
					repos=()
 | 
				
			||||||
keys=()
 | 
					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")
 | 
					dirs=("-v $(pwd):/workdir" "-v ${HOME}/.gnupg:/home/$(id -un)/.gnupg:ro")
 | 
				
			||||||
packages=()
 | 
					packages=()
 | 
				
			||||||
targets="all check distcheck"
 | 
					targets="all check distcheck"
 | 
				
			||||||
@@ -243,7 +243,6 @@ case $mode in
 | 
				
			|||||||
        docker exec ${DOCKER_ID} ./resolve-debbuilddeps.sh
 | 
					        docker exec ${DOCKER_ID} ./resolve-debbuilddeps.sh
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
    (rpm|yum|dnf|zypper)
 | 
					    (rpm|yum|dnf|zypper)
 | 
				
			||||||
        ./bootstrap.sh -t dist
 | 
					 | 
				
			||||||
        docker exec ${DOCKER_ID} ./resolve-rpmbuilddeps.sh || true
 | 
					        docker exec ${DOCKER_ID} ./resolve-rpmbuilddeps.sh || true
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
esac
 | 
					esac
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,13 +15,16 @@ SCHROOTNAME="$1"
 | 
				
			|||||||
PACKAGE_NAME=$(sed -n 's/^ *m4_define(x_package_name, \(.*\)).*/\1/p' configure.ac)
 | 
					PACKAGE_NAME=$(sed -n 's/^ *m4_define(x_package_name, \(.*\)).*/\1/p' configure.ac)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test -n "${SCHROOTNAME}"; then
 | 
					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')
 | 
					    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
 | 
					    if test -n "${FILES}"; then
 | 
				
			||||||
        schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL}  install -y ${FILES}
 | 
					        schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL}  install -y ${FILES}
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
else
 | 
					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')
 | 
					    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
 | 
					    if test -n "${FILES}"; then
 | 
				
			||||||
        ${INSTALL_TOOL} install -y ${FILES}
 | 
					        ${INSTALL_TOOL} install -y ${FILES}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user