2000-10-23 21:45:05 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2006-02-16 19:09:27 +01:00
|
|
|
# $NetBSD: DEINSTALL,v 1.3 2006/02/16 18:09:27 wiz Exp $
|
2000-10-23 21:45:05 +02:00
|
|
|
|
|
|
|
PKGNAME=$1
|
|
|
|
STAGE=$2
|
|
|
|
|
2000-12-22 18:26:18 +01:00
|
|
|
LOCALBASE="@LOCALBASE@"
|
2001-08-08 09:37:51 +02:00
|
|
|
|
|
|
|
CP="@CP@"
|
2001-09-28 22:34:53 +02:00
|
|
|
CMP="@CMP@"
|
|
|
|
ECHO="@ECHO@"
|
2001-08-08 09:37:51 +02:00
|
|
|
GREP="@GREP@"
|
2000-12-22 18:26:18 +01:00
|
|
|
RM="@RM@"
|
|
|
|
RMDIR="@RMDIR@"
|
|
|
|
TRUE="@TRUE@"
|
|
|
|
|
2001-09-28 22:34:53 +02:00
|
|
|
LOCALBASE=@LOCALBASE@
|
|
|
|
X11BASE=@X11BASE@
|
|
|
|
X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
|
|
|
|
HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
|
|
|
|
|
2000-10-23 21:45:05 +02:00
|
|
|
case ${STAGE} in
|
|
|
|
POST-DEINSTALL)
|
2001-09-28 22:34:53 +02:00
|
|
|
${ECHO} -n "Updating ${HOSTDEF}..."
|
|
|
|
${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
|
|
|
|
( ${GREP} -v LessTif ${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
|
|
|
|
${ECHO} "done."
|
2001-08-08 09:37:51 +02:00
|
|
|
|
2000-10-23 21:45:05 +02:00
|
|
|
if [ ${PKG_PREFIX} != ${LOCALBASE} ]
|
|
|
|
then
|
2000-12-22 18:26:18 +01:00
|
|
|
${RM} -f ${LOCALBASE}/share/aclocal/ac_find_motif.m4
|
2000-10-23 21:45:05 +02:00
|
|
|
fi
|
2001-09-28 22:34:53 +02:00
|
|
|
|
|
|
|
${RMDIR} -p ${PKG_PREFIX}/lib/X11/config 2>/dev/null || ${TRUE}
|
2000-10-23 21:45:05 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
exit 0
|