multilib-rpm-config/multilib-library
Vít Ondruch e2c66c6d03 Use uname -m to detect platform
`uname -i` functionality is non-portable and the custom patch Fedora was
carrying around was recently dropped:

cd953e11dd

The [rhbz#548834](https://bugzilla.redhat.com/show_bug.cgi?id=548834#c5)
suggests to use `uname -m` instead.

Resolves: rhbz#2158752
2023-02-07 13:13:38 +00:00

56 lines
726 B
Bash

progname=$(basename "$0")
opt_verbose=:
opt_arch=$(uname -m)
multilib_arches="
i386 x86_64
ppc ppc64
s390 s390x
sparc sparc64
"
verbose ()
{
$opt_verbose && echo >&2 "INFO: $progname: $*"
}
die ()
{
echo >&2 " # $*"
print_help 1
}
error ()
{
error_occurred=:
echo >&2 " ! $*"
}
is_multilib ()
{
_m_result=false
for _m_arch in $multilib_arches
do
if test "$_m_arch" = "$1"; then
_m_result=:
break
fi
done
$_m_result
}
fix_arch ()
{
eval "_arch=\$$1"
case $_arch in
# See rhbz#1242873 for more info.
ppc64p7)
eval "$1=ppc64"
;;
esac
}
error_occurred=false
# vi: ft=sh