diff options
author | zuntum <zuntum@pkgsrc.org> | 2001-10-31 22:03:21 +0000 |
---|---|---|
committer | zuntum <zuntum@pkgsrc.org> | 2001-10-31 22:03:21 +0000 |
commit | d3db18607dbb7d59aeab9f0f846bad1948e95a7e (patch) | |
tree | 8ff0c0747d9d6438c6411ba57bcffd7476fce523 /x11/openmotif/DEINSTALL | |
parent | 273821c4d377411699fe450ab9d48f7e5933d9b6 (diff) | |
download | pkgsrc-d3db18607dbb7d59aeab9f0f846bad1948e95a7e.tar.gz |
Move pkg/ files into package's toplevel directory
Diffstat (limited to 'x11/openmotif/DEINSTALL')
-rw-r--r-- | x11/openmotif/DEINSTALL | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/x11/openmotif/DEINSTALL b/x11/openmotif/DEINSTALL new file mode 100644 index 00000000000..f39010ade5c --- /dev/null +++ b/x11/openmotif/DEINSTALL @@ -0,0 +1,55 @@ +#!/bin/sh +# +# $NetBSD: DEINSTALL,v 1.1 2001/10/31 22:11:16 zuntum Exp $ + +PKGNAME=$1 +STAGE=$2 + +CP="@CP@" +CMP="@CMP@" +ECHO="@ECHO@" +GREP="@GREP@" +MV="@MV@" +RM="@RM@" +RMDIR="@RMDIR@" +TRUE="@TRUE@" + +X11BASE=@X11BASE@ +MOTIF_RULES=${PKG_PREFIX}/lib/X11/config/Motif.rules +MOTIF_TMPL=${PKG_PREFIX}/lib/X11/config/Motif.tmpl +X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def +HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def + +case ${STAGE} in +DEINSTALL) + ;; + +POST-DEINSTALL) + ${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 + ${ECHO} "done." + + ${RM} -f ${MOTIF_RULES} ${MOTIF_TMPL} + if [ ${PKG_PREFIX} = ${X11BASE} ] + then + ${MV} -f ${MOTIF_RULES}.openmotif.bak ${MOTIF_RULES} + ${MV} -f ${MOTIF_TMPL}.openmotif.bak ${MOTIF_TMPL} + fi + + ${RMDIR} -p ${PKG_PREFIX}/lib/X11/config 2>/dev/null || ${TRUE} + ;; + +*) + ${ECHO} "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 |