59 lines
1 KiB
Text
59 lines
1 KiB
Text
#!/bin/sh
|
|
#
|
|
# $NetBSD: INSTALL,v 1.3 2003/05/06 17:42:24 jmmv Exp $
|
|
|
|
PKGNAME=$1
|
|
STAGE=$2
|
|
|
|
CP="@CP@"
|
|
ECHO="@ECHO@"
|
|
GREP="@GREP@"
|
|
LN="@LN@"
|
|
RM="@RM@"
|
|
|
|
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
|
|
PRE-INSTALL)
|
|
;;
|
|
|
|
POST-INSTALL)
|
|
for prog in ${FONT_PROGS}
|
|
do
|
|
if [ -f ${X11BASE}/bin/${prog} -a \
|
|
${PKG_PREFIX} != ${X11BASE} ]
|
|
then
|
|
${LN} -fs ${X11BASE}/bin/${prog} \
|
|
${PKG_PREFIX}/bin/${prog}
|
|
fi
|
|
done
|
|
|
|
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
|