46 lines
800 B
Text
46 lines
800 B
Text
#!/bin/sh
|
|
#
|
|
# $NetBSD: INSTALL,v 1.1 2001/10/31 21:19:17 zuntum Exp $
|
|
|
|
PKGNAME=$1
|
|
STAGE=$2
|
|
|
|
CP="@CP@"
|
|
GREP="@GREP@"
|
|
RM="@RM@"
|
|
|
|
X11BASE=@X11BASE@
|
|
X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
|
|
HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
|
|
|
|
case ${STAGE} in
|
|
PRE-INSTALL)
|
|
;;
|
|
|
|
POST-INSTALL)
|
|
if [ ${PKG_PREFIX} = ${X11BASE} -o -f ${HOSTDEF} ]
|
|
then
|
|
echo -n "Updating ${HOSTDEF}..."
|
|
${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
|
|
else
|
|
echo -n "Creating ${HOSTDEF}..."
|
|
if [ -f ${X11_HOSTDEF} ]
|
|
then
|
|
${CP} -f ${X11_HOSTDEF} ${HOSTDEF}.bak
|
|
else
|
|
${CP} -f /dev/null ${HOSTDEF}.bak
|
|
fi
|
|
fi
|
|
( echo '#include <xpkgwedge.def>'; \
|
|
${GREP} -v xpkgwedge ${HOSTDEF}.bak; \
|
|
) > ${HOSTDEF}
|
|
${RM} -f ${HOSTDEF}.bak
|
|
echo "done."
|
|
;;
|
|
|
|
*)
|
|
echo "Unexpected argument: ${STAGE}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
exit 0
|