# $NetBSD: INSTALL,v 1.10 2004/04/27 18:33:52 tv Exp $ FONT_PROGS="@FONT_PROGS@" X11BASE=@X11BASE@ X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def X11_SITEDEF=${X11BASE}/lib/X11/config/site.def SITEDEF=${PKG_PREFIX}/lib/X11/config/site.def X11_SV4LIB=${X11BASE}/lib/X11/config/sv4Lib.tmpl SV4LIB=${PKG_PREFIX}/lib/X11/config/sv4Lib.tmpl SV4LIB_SUBST_SED="-e s/^ / /" SITEDEF_SUBST_SED="-e s/\#endif.*VendorCF.*/\#include \\ &/" case ${STAGE} in POST-INSTALL) ${ECHO_N} "Symlinking font programs..." 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 ${ECHO} "done." ;; VIEW-INSTALL) if [ ${PKG_PREFIX} = ${X11BASE} -o -s ${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 '; \ ${GREP} -v xpkgwedge ${HOSTDEF}.bak; \ ) > ${HOSTDEF} ${RM} -f ${HOSTDEF}.bak ${ECHO} "done." case ${X11BASE} in *openwin) ${ECHO_N} "Patching OpenWindows templates..." ${SED} "${SITEDEF_SUBST_SED}" ${X11_SITEDEF} > ${SITEDEF} ${SED} "${SV4LIB_SUBST_SED}" ${X11_SV4LIB} > ${SV4LIB} ${ECHO} "done." ;; esac ;; esac