57 lines
1.3 KiB
Text
57 lines
1.3 KiB
Text
|
#!/bin/sh
|
||
|
#
|
||
|
# $NetBSD: INSTALL,v 1.1 2000/10/13 23:36:39 jlam Exp $
|
||
|
|
||
|
PKGNAME=$1
|
||
|
STAGE=$2
|
||
|
|
||
|
case ${STAGE} in
|
||
|
PRE-INSTALL)
|
||
|
;;
|
||
|
POST-INSTALL)
|
||
|
MACHINE_ARCH=@MACHINE_ARCH@
|
||
|
OBJECT_FMT=@OBJECT_FMT@
|
||
|
|
||
|
# Only create the symlink on certain platform/object combinations.
|
||
|
#
|
||
|
create_emul_symlink=0
|
||
|
if [ "${MACHINE_ARCH}" = "i386" -a "${OBJECT_FMT}" = "ELF" ]
|
||
|
then
|
||
|
create_emul_symlink=1
|
||
|
fi
|
||
|
|
||
|
if [ ${create_emul_symlink} = 1 ]
|
||
|
then
|
||
|
# Create a symlink from /emul/aout --> ${PKG_PREFIX}/emul/out
|
||
|
# if it doesn't already exist. Warn if we can't do this.
|
||
|
#
|
||
|
emul=aout
|
||
|
if [ "`cd /etc && cd ${PKG_PREFIX}/emul/$emul 2>/dev/null && pwd -P`" \
|
||
|
!= "`cd / && cd /emul/$emul 2>/dev/null && pwd -P`" ]
|
||
|
then
|
||
|
if [ -e /emul/$emul -o -L /emul/$emul ] || \
|
||
|
[ \( -e /emul -o -L /emul \) -a ! -d /emul ]
|
||
|
then
|
||
|
cat <<EOF
|
||
|
==============================================================================
|
||
|
IMPORTANT: You must create a symbolic link from /emul/$emul
|
||
|
to ${PKG_PREFIX}/emul/$emul in order for this package to work
|
||
|
properly.
|
||
|
|
||
|
(It seems there is something else located at /emul/$emul.)
|
||
|
==============================================================================
|
||
|
EOF
|
||
|
else
|
||
|
mkdir -p /emul
|
||
|
ln -sf ${PKG_PREFIX}/emul/$emul /emul/$emul
|
||
|
fi
|
||
|
fi
|
||
|
fi
|
||
|
;;
|
||
|
*)
|
||
|
echo "Unexpected argument: ${STAGE}"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
exit 0
|