pkgsrc/pkgtools/osabi/INSTALL
obache 56c954b911 Kill Interix libc shlibname base OS_VERSION detection, broken for SUA.
It is based on ancient bsd.prefs.mk and not works as expected for SUA,
because all SUA (5.2, 6.0 and 6.1) have libc.so.5.2 (and also old version).
Moreover shlibname base OS version was introduced to speed up to avoid invoking
`uname', but in this script, `uname' always will be invoked.
2011-02-05 13:21:13 +00:00

35 lines
833 B
Text

# $NetBSD: INSTALL,v 1.2 2011/02/05 13:21:13 obache Exp $
UNAME="@UNAME@"
case ${STAGE} in
PRE-INSTALL)
OS_VERSION=`${UNAME} -r`
PKG_VERSION="${PKGNAME##*-}"
case `${UNAME} -s` in
AIX)
if ${TEST} -f /usr/bin/oslevel ;then
OS_VERSION=`/usr/bin/oslevel | \
sed -e's/\([0-9]*\.[0-9]*\).*/\1/'`
else
OS_VERSION="`${UNAME} -v`.`${UNAME} -r`"
OS_VERSION=`echo "${OS_VERSION}" | \
sed -e's/\([0-9]*\.[0-9]*\).*/\1/'`
fi
;;
DragonFly|FreeBSD|Linux)
OS_VERSION=`echo "${OS_VERSION}" | sed -e's/-.*$//'`
;;
OSF1)
OS_VERSION=`echo "${OS_VERSION}" | sed -e's/^V//'`
;;
HPUX)
OS_VERSION=`echo "${OS_VERSION}" | sed -e's/^B.//'`
;;
esac
if ${TEST} "${OS_VERSION}" != "${PKG_VERSION}" ;then
echo "The Operating System version (${OS_VERSION}) does not match ${PKG_VERSION}"
exit 1
fi
;;
esac