summaryrefslogtreecommitdiffstats
path: root/redhat/build
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/build')
-rwxr-xr-xredhat/build/build_rpm_package.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/redhat/build/build_rpm_package.sh b/redhat/build/build_rpm_package.sh
index 3e4699cd6..fa5439b2c 100755
--- a/redhat/build/build_rpm_package.sh
+++ b/redhat/build/build_rpm_package.sh
@@ -13,10 +13,14 @@ SPECFILE=$(get_specfile.sh ${PKGNAME} ${TDE_VERSION})
VERSION=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION} || :)
case "${VERSION}" in *~pre*) PREVERSION="${VERSION#*~}";; esac
+ARCH="$(uname -i)"
+if [ "${ARCH}" = "unknown" ]; then
+ ARCH="$(uname -m)"
+fi
DIST="$(rpmdist.sh --dist)"
[ -z "${TMPPATH}" ] && TMPPATH="/dev/shm"
-BUILDDIR="${TMPPATH}/BUILD${DIST}.$(uname -i)"
-BUILDROOTDIR="${TMPPATH}/BUILDROOT${DIST}.$(uname -i)"
+BUILDDIR="${TMPPATH}/BUILD${DIST}.${ARCH}"
+BUILDROOTDIR="${TMPPATH}/BUILDROOT${DIST}.${ARCH}"
LOGFILE="${TMPPATH}/log.${COMP##*/}"
export TEMPDIR="$(mktemp -d)"