fixed directories with root rights in rpm build

This commit is contained in:
Marc Wäckerlin
2017-03-21 11:04:24 +00:00
parent d4f73299a6
commit c901c00ba1
2 changed files with 26 additions and 0 deletions

View File

@@ -16,6 +16,12 @@ PACKAGE_NAME=$(sed -n 's/^ *m4_define(x_package_name, \(.*\)).*/\1/p' configure.
TRAP_CMD=
DEPS=
for f in BUILD BUILDROOT RPMS SPECS SRPMS; do
if ! test -d $f; then
TRAP_CMD+="rm -rf $f;"
mkdir $f
fi
done
if test -e ${PACKAGE_NAME}.spec.in -a ! -e ${PACKAGE_NAME}.spec; then
for f in $(sed -n 's, *AX_\(RPM\|ALL\)_DEPEND_IFEXISTS(\([^)]*\)).*,\2,p' configure.ac); do
if (test -x /usr/bin/zypper && zypper search -x "$f" 1>&2 > /dev/null) || \
@@ -64,4 +70,5 @@ else
fi
fi
echo "**** Success: All Dependencies Resolved"