tested on fedora, centos, opensuse and ubuntu

This commit is contained in:
Marc Wäckerlin
2016-12-07 19:28:11 +00:00
parent 6cd6875e49
commit fc92d9e8ac
6 changed files with 27 additions and 8 deletions

View File

@@ -15,15 +15,11 @@ 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 automake libtool subversion gcc-c++ pkgconfig
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 automake libtool subversion gcc-c++ pkgconfig
./bootstrap.sh -c
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}