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

This commit is contained in:
Marc Wäckerlin
2016-12-07 12:35:40 +00:00
parent 86cc10fc11
commit 9e29ffddb4
3 changed files with 7 additions and 5 deletions

View File

@@ -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}