2004-04-30 21:44:21 +02:00
|
|
|
# $NetBSD: DEINSTALL,v 1.9 2004/04/30 19:44:21 tv Exp $
|
2001-06-18 07:17:14 +02:00
|
|
|
|
2002-02-26 22:49:05 +01:00
|
|
|
FONT_PROGS="@FONT_PROGS@"
|
2001-06-18 07:17:14 +02:00
|
|
|
X11BASE=@X11BASE@
|
2003-08-30 13:08:22 +02:00
|
|
|
|
2001-06-18 07:17:14 +02:00
|
|
|
X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
|
|
|
|
HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
|
2003-09-10 19:31:40 +02:00
|
|
|
SITEDEF=${PKG_PREFIX}/lib/X11/config/site.def
|
|
|
|
SV4LIB=${PKG_PREFIX}/lib/X11/config/sv4Lib.tmpl
|
2001-06-18 07:17:14 +02:00
|
|
|
|
2000-10-23 19:32:06 +02:00
|
|
|
case ${STAGE} in
|
2003-11-23 07:46:54 +01:00
|
|
|
VIEW-DEINSTALL)
|
2004-04-27 20:33:52 +02:00
|
|
|
${ECHO_N} "Removing font program symlinks from view..."
|
2003-08-30 13:08:22 +02:00
|
|
|
for prog in ${FONT_PROGS}; do
|
|
|
|
if [ -f ${PKG_PREFIX}/bin/$prog -a \
|
|
|
|
${PKG_PREFIX} != ${X11BASE} ]; then
|
|
|
|
${RM} -f ${PKG_PREFIX}/bin/$prog
|
2002-02-26 22:49:05 +01:00
|
|
|
fi
|
|
|
|
done
|
2003-11-23 08:09:12 +01:00
|
|
|
${ECHO} "done."
|
2002-02-26 22:49:05 +01:00
|
|
|
|
2004-04-27 20:33:52 +02:00
|
|
|
${ECHO_N} "Updating ${HOSTDEF}..."
|
2001-06-18 07:17:14 +02:00
|
|
|
${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
|
|
|
|
( ${GREP} -v xpkgwedge ${HOSTDEF}.bak || ${TRUE} ) > ${HOSTDEF}
|
|
|
|
${RM} -f ${HOSTDEF}.bak
|
2003-08-30 13:08:22 +02:00
|
|
|
if [ ${PKG_PREFIX} != ${X11BASE} -a -f ${X11_HOSTDEF} ] && \
|
|
|
|
${CMP} -s ${X11_HOSTDEF} ${HOSTDEF}; then
|
2001-06-18 07:17:14 +02:00
|
|
|
${RM} -f ${HOSTDEF}
|
2000-10-23 19:32:06 +02:00
|
|
|
fi
|
2004-04-30 21:44:21 +02:00
|
|
|
case `uname`:${X11BASE} in
|
|
|
|
*:*openwin)
|
2003-09-19 02:53:58 +02:00
|
|
|
${RM} -f ${SITEDEF} ${SV4LIB}
|
|
|
|
;;
|
2004-04-30 21:44:21 +02:00
|
|
|
Interix:/usr/X11R6)
|
|
|
|
${RM} -f ${SITEDEF}
|
|
|
|
;;
|
2003-09-10 19:31:40 +02:00
|
|
|
esac
|
2002-02-26 22:49:05 +01:00
|
|
|
${ECHO} "done."
|
2003-11-23 07:46:54 +01:00
|
|
|
;;
|
|
|
|
|
|
|
|
DEINSTALL)
|
2004-04-27 20:33:52 +02:00
|
|
|
${ECHO_N} "Removing font program symlinks..."
|
2003-11-23 07:46:54 +01:00
|
|
|
for prog in ${FONT_PROGS}; do
|
|
|
|
if [ -f ${PKG_PREFIX}/bin/$prog -a \
|
|
|
|
${PKG_PREFIX} != ${X11BASE} ]; then
|
|
|
|
${RM} -f ${PKG_PREFIX}/bin/$prog
|
|
|
|
fi
|
|
|
|
done
|
2003-11-23 08:09:12 +01:00
|
|
|
${ECHO} "done."
|
2003-11-23 07:46:54 +01:00
|
|
|
;;
|
|
|
|
|
|
|
|
POST-DEINSTALL)
|
2001-06-18 07:17:14 +02:00
|
|
|
${RMDIR} -p ${PKG_PREFIX}/lib/X11/config 2>/dev/null || ${TRUE}
|
2000-10-23 19:32:06 +02:00
|
|
|
;;
|
|
|
|
esac
|