46 lines
889 B
Text
46 lines
889 B
Text
|
#!/bin/sh
|
||
|
#
|
||
|
# $NetBSD: INSTALL,v 1.1 2001/09/08 20:03:45 jlam Exp $
|
||
|
|
||
|
PKGNAME=$1
|
||
|
STAGE=$2
|
||
|
|
||
|
CP="@CP@"
|
||
|
ECHO="@ECHO@"
|
||
|
GREP="@GREP@"
|
||
|
LN="@LN@"
|
||
|
MV="@MV@"
|
||
|
|
||
|
X11BASE=@X11BASE@
|
||
|
MOTIF_RULES=${PKG_PREFIX}/lib/X11/config/Motif.rules
|
||
|
MOTIF_TMPL=${PKG_PREFIX}/lib/X11/config/Motif.tmpl
|
||
|
X11_HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
|
||
|
|
||
|
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}
|
||
|
|
||
|
${ECHO} -n "Updating ${X11_HOSTDEF}..."
|
||
|
${CP} -f ${X11_HOSTDEF} ${X11_HOSTDEF}.bak
|
||
|
( ${GREP} -v OpenMotif ${X11_HOSTDEF}.bak; \
|
||
|
${ECHO} '#include <OpenMotif.def>' ) \
|
||
|
> ${X11_HOSTDEF}
|
||
|
${ECHO} "done."
|
||
|
;;
|
||
|
|
||
|
*)
|
||
|
${ECHO} "Unexpected argument: ${STAGE}"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
exit 0
|