blob: 61ab91ea8c6697ee130ed2f9eb567679833b9339 (
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
|
#!/bin/sh
#
# $NetBSD: INSTALL,v 1.3 2003/08/30 20:23:08 jlam Exp $
PKGNAME=$1
STAGE=$2
LOCALBASE="@LOCALBASE@"
CP="@CP@"
ECHO="@ECHO@"
GREP="@GREP@"
LN="@LN@"
MV="@MV@"
RM="@RM@"
LOCALBASE=@LOCALBASE@
X11BASE=@X11BASE@
X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
case ${STAGE} in
POST-INSTALL)
if [ ${PKG_PREFIX} = ${X11BASE} -o -f ${HOSTDEF} ]
then
${ECHO} -n "Updating ${HOSTDEF}..."
${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
else
${ECHO} -n "Creating ${HOSTDEF}..."
if [ -f ${X11_HOSTDEF} ]
then
${CP} -f ${X11_HOSTDEF} ${HOSTDEF}.bak
else
${CP} -f /dev/null ${HOSTDEF}.bak
fi
fi
( ${GREP} -v LessTif ${HOSTDEF}.bak; \
${ECHO} '#include <LessTif.def>'; \
) > ${HOSTDEF}
${RM} -f ${HOSTDEF}.bak
${ECHO} "done."
if [ ${PKG_PREFIX} != ${LOCALBASE} ]
then
${LN} -fs ${PKG_PREFIX}/share/aclocal/ac_find_motif.m4 \
${LOCALBASE}/share/aclocal/ac_find_motif.m4
fi
;;
esac
exit 0
|