pkgsrc/pkgtools/xpkgwedge/DEINSTALL
jlam e760c0d462 Modernize this package a bit:
* Use bsd.pkg.install.mk instead of supplying custom INSTALL/DEINSTALL
  scripts.

* Note that this package doesn't really use buildlink.

* Remove ancient BUILDLINK_DEPENDS= line at the bottom of the file that
  we no longer need since the buildlink1 days of yore.
2003-08-30 11:08:22 +00:00

29 lines
782 B
Text
Executable file

# $NetBSD: DEINSTALL,v 1.3 2003/08/30 11:08:22 jlam Exp $
FONT_PROGS="@FONT_PROGS@"
X11BASE=@X11BASE@
X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
case ${STAGE} in
POST-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
${ECHO} "done."
${RMDIR} -p ${PKG_PREFIX}/lib/X11/config 2>/dev/null || ${TRUE}
;;
esac