2003-08-30 22:22:49 +02:00
|
|
|
# $NetBSD: DEINSTALL,v 1.4 2003/08/30 20:23:08 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
|
|
|
|
POST-DEINSTALL)
|
2001-09-28 10:54:56 +02:00
|
|
|
${ECHO} -n "Updating ${HOSTDEF}..."
|
|
|
|
${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
|
|
|
|
( ${GREP} -v OpenMotif ${HOSTDEF}.bak || ${TRUE} ) > ${HOSTDEF}
|
|
|
|
${RM} -f ${HOSTDEF}.bak
|
|
|
|
if [ ${PKG_PREFIX} != ${X11BASE} ] && \
|
|
|
|
[ -f ${X11_HOSTDEF} ] && \
|
|
|
|
${CMP} -s ${X11_HOSTDEF} ${HOSTDEF}
|
|
|
|
then
|
|
|
|
${RM} -f ${HOSTDEF}
|
|
|
|
fi
|
2001-09-08 22:03:43 +02:00
|
|
|
${ECHO} "done."
|
|
|
|
|
|
|
|
${RM} -f ${MOTIF_RULES} ${MOTIF_TMPL}
|
|
|
|
if [ ${PKG_PREFIX} = ${X11BASE} ]
|
|
|
|
then
|
2003-05-19 21:43:16 +02:00
|
|
|
${MV} -f ${MOTIF_RULES}.openmotif.bak ${MOTIF_RULES} 2>/dev/null
|
|
|
|
${MV} -f ${MOTIF_TMPL}.openmotif.bak ${MOTIF_TMPL} 2>/dev/null
|
2001-09-08 22:03:43 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
${RMDIR} -p ${PKG_PREFIX}/lib/X11/config 2>/dev/null || ${TRUE}
|
|
|
|
;;
|
|
|
|
esac
|