pkgsrc/pkgtools/osabi/INSTALL
sbd 95399dd4b4 Import the 'osabi-${OPSYS}-${OS_VERSION}' as pkgtools/osabi
This is a dummy-package which is made a dependence for packages which are
tightly bound to a specific version of an operating system, e.g. LKMs or
sysutils/lsof. Such binary packages are not backwards compatible with other
versions of the OS.

The version number of this package should be similar to the operating system
version (`uname -r' output).
2010-04-30 03:18:26 +00:00

44 lines
1,009 B
Text

# $NetBSD: INSTALL,v 1.1.1.1 2010/04/30 03:18:26 sbd 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/-.*$//'`
;;
Interix)
if ${TEST} -f /usr/lib/libc.so.3.5 ;then
OS_VERSION="3.5"
elif ${TEST} -f /usr/lib/libc.so.3.1 ;then
OS_VERSION="3.1"
else
OS_VERSION="3.0"
fi
;;
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