blob: 57514d082cd87d51213ea61befea9301b21a5baa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/bin/sh
#
# $NetBSD: DEINSTALL,v 1.1.1.1 2001/07/02 21:00:44 jlam Exp $
PKGNAME=$1
STAGE=$2
CP="@CP@"
DIFF="@DIFF@"
GREP="@GREP@"
RM="@RM@"
RMDIR="@RMDIR@"
TRUE="@TRUE@"
X11BASE=@X11BASE@
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 buildlinkX11 ${HOSTDEF}.bak || ${TRUE} ) > ${HOSTDEF}
${RM} -f ${HOSTDEF}.bak
if [ ${PKG_PREFIX} != ${X11BASE} ] && \
${DIFF} -q ${X11_HOSTDEF} ${HOSTDEF} >/dev/null
then
${RM} -f ${HOSTDEF}
fi
echo "done."
${RMDIR} -p ${PKG_PREFIX}/lib/X11/config 2>/dev/null || ${TRUE}
;;
*)
echo "Unexpected argument: ${STAGE}"
exit 1
;;
esac
exit 0
|