2002-01-10 13:10:45 +01:00
|
|
|
# $NetBSD: INSTALL,v 1.2 2002/01/10 12:10:45 jlam Exp $
|
2001-09-08 22:03:43 +02:00
|
|
|
|
|
|
|
X11BASE=@X11BASE@
|
|
|
|
MOTIF_RULES=${PKG_PREFIX}/lib/X11/config/Motif.rules
|
|
|
|
MOTIF_TMPL=${PKG_PREFIX}/lib/X11/config/Motif.tmpl
|
2001-09-28 10:54:56 +02:00
|
|
|
X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
|
|
|
|
HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
|
2001-09-08 22:03:43 +02:00
|
|
|
|
|
|
|
case ${STAGE} in
|
|
|
|
PRE-INSTALL)
|
|
|
|
;;
|
|
|
|
|
|
|
|
POST-INSTALL)
|
|
|
|
if [ ${PKG_PREFIX} = ${X11BASE} ]
|
|
|
|
then
|
|
|
|
${MV} -f ${MOTIF_RULES} ${MOTIF_RULES}.openmotif.bak
|
|
|
|
${MV} -f ${MOTIF_TMPL} ${MOTIF_TMPL}.openmotif.bak
|
|
|
|
fi
|
|
|
|
${LN} -sf OpenMotif.rules ${MOTIF_RULES}
|
|
|
|
${LN} -sf OpenMotif.tmpl ${MOTIF_TMPL}
|
|
|
|
|
2001-09-28 10:54:56 +02:00
|
|
|
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 OpenMotif ${HOSTDEF}.bak; \
|
|
|
|
${ECHO} '#include <OpenMotif.def>'; \
|
|
|
|
) > ${HOSTDEF}
|
|
|
|
${RM} -f ${HOSTDEF}.bak
|
2001-09-08 22:03:43 +02:00
|
|
|
${ECHO} "done."
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
${ECHO} "Unexpected argument: ${STAGE}"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|