e0063aa8e5
the font program symlinks at both view-deinstall and normal deinstallation time since the files aren't listed in the PLIST (the font programs are handled completely by the INSTALL/DEINSTALL scripts).
48 lines
1.1 KiB
Text
Executable file
48 lines
1.1 KiB
Text
Executable file
# $NetBSD: DEINSTALL,v 1.6 2003/11/23 06:46:54 jlam Exp $
|
|
|
|
FONT_PROGS="@FONT_PROGS@"
|
|
X11BASE=@X11BASE@
|
|
|
|
X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
|
|
HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
|
|
SITEDEF=${PKG_PREFIX}/lib/X11/config/site.def
|
|
SV4LIB=${PKG_PREFIX}/lib/X11/config/sv4Lib.tmpl
|
|
|
|
case ${STAGE} in
|
|
VIEW-DEINSTALL)
|
|
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
|
|
|
|
${ECHO} -n "Updating ${HOSTDEF}..."
|
|
${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
|
|
( ${GREP} -v xpkgwedge ${HOSTDEF}.bak || ${TRUE} ) > ${HOSTDEF}
|
|
${RM} -f ${HOSTDEF}.bak
|
|
if [ ${PKG_PREFIX} != ${X11BASE} -a -f ${X11_HOSTDEF} ] && \
|
|
${CMP} -s ${X11_HOSTDEF} ${HOSTDEF}; then
|
|
${RM} -f ${HOSTDEF}
|
|
fi
|
|
case ${X11BASE} in
|
|
*openwin)
|
|
${RM} -f ${SITEDEF} ${SV4LIB}
|
|
;;
|
|
esac
|
|
${ECHO} "done."
|
|
;;
|
|
|
|
DEINSTALL)
|
|
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
|
|
;;
|
|
|
|
POST-DEINSTALL)
|
|
${RMDIR} -p ${PKG_PREFIX}/lib/X11/config 2>/dev/null || ${TRUE}
|
|
;;
|
|
esac
|