summaryrefslogtreecommitdiff
path: root/emulators/netbsd32_compat16/INSTALL
blob: 5aff595eed50384dfa170833e2ea76e31ae96c98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# $NetBSD: INSTALL,v 1.3 2005/01/11 05:12:56 hamajima Exp $

case ${STAGE} in
POST-INSTALL)
	MACHINE_ARCH=@MACHINE_ARCH@
	OBJECT_FMT=@OBJECT_FMT@

	# Only create the symlink on certain platform/object combinations.  Note
	# that sparc64 a.out compatibility lives in /emul/aout, not /emul/netbsd32.
	#
	create_emul_symlink=0
	case ${MACHINE_ARCH} in
		sparc64 | x86_64)
			create_emul_symlink=1
			;;
	esac

	if [ ${create_emul_symlink} = 1 ]
	then
		# Create a symlink from /emul/aout --> ${PKG_PREFIX}/emul/aout
		# if it doesn't already exist.  Warn if we can't do this.
		#
		emul=netbsd32
		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

	# Regenerate the shared library cache.  This should work on either
	# a.out or on ELF with the 1.5 release.
	#
	( @LDCONFIG@ || ${TRUE} ) >/dev/null 2>&1
	;;
esac