78796546c3
font maps for dvips and dvipdfm. In this way, configuration files (fmtutil.cnf and updmap.cfg) are properly installed under PKG_SYSCONFDIR, not under PREFIX. Bump PKGREVISION for teTeX-texmf and teTeX-bin.
133 lines
2.7 KiB
Text
133 lines
2.7 KiB
Text
# $NetBSD: INSTALL,v 1.10 2009/01/26 21:17:05 minskim Exp $
|
|
|
|
PATH="@PREFIX@"/bin:"${PATH}"
|
|
export PATH
|
|
|
|
case "${STAGE}" in
|
|
POST-INSTALL)
|
|
${TEST} ! -x ./+TEXCONFIG || ./+TEXCONFIG PAPER
|
|
${TEST} ! -x ./+TETEX || ./+TETEX ADD
|
|
;;
|
|
esac
|
|
|
|
#
|
|
# Generate a +TETEX script that updates the teTeX installation
|
|
# based on user-modifiable configuration files.
|
|
#
|
|
case "${STAGE},$1" in
|
|
UNPACK,|UNPACK,+TETEX)
|
|
${CAT} > ./+TETEX << 'EOF'
|
|
#!@SH@
|
|
#
|
|
# +TETEX - teTeX installation update script
|
|
#
|
|
# Usage: ./+TETEX ADD|REMOVE
|
|
|
|
CAT="@CAT@"
|
|
ECHO="@ECHO@"
|
|
GREP="@GREP@"
|
|
RM="@RM@"
|
|
RMDIR="@RMDIR@"
|
|
TEST="@TEST@"
|
|
TRUE="@TRUE@"
|
|
|
|
SELF=$0
|
|
ACTION=$1
|
|
: ${PKG_PREFIX=@PREFIX@}
|
|
|
|
TEXMF_DISTDATADIR="${PKG_PREFIX}/share/texmf-dist"
|
|
TEXMF_DATADIR="${PKG_PREFIX}/share/texmf"
|
|
TEXMF_LOCALDATADIR="${PKG_PREFIX}/share/texmf-local"
|
|
TEXMF_VARDIR="@VARBASE@/lib/texmf"
|
|
|
|
exitcode=0
|
|
case $ACTION in
|
|
ADD)
|
|
# Update teTeX installation to support different TeX formats.
|
|
${TEST} ! -x ${PKG_PREFIX}/bin/texlinks ||
|
|
${PKG_PREFIX}/bin/texlinks
|
|
;;
|
|
|
|
REMOVE)
|
|
# Remove config files generated by +TEXCONFIG.
|
|
${RM} -f @PKG_SYSCONFBASE@/texmf/dvips/config/config.ps
|
|
${RM} -f @PKG_SYSCONFBASE@/texmf/xdvi/XDvi
|
|
|
|
# Remove stray directores.
|
|
for dir in \
|
|
@PKG_SYSCONFBASE@/texmf/dvips/config \
|
|
@PKG_SYSCONFBASE@/texmf/xdvi
|
|
do
|
|
${RMDIR} -p "$dir" 2>/dev/null || ${TRUE}
|
|
done
|
|
@MKTEXLSR@ ${TEXMF_VARDIR} @PKG_SYSCONFBASE@/texmf
|
|
;;
|
|
|
|
*)
|
|
${ECHO} "Usage: ./+TETEX ADD|REMOVE [metadatadir]"
|
|
;;
|
|
esac
|
|
exit $exitcode
|
|
EOF
|
|
${CHMOD} +x ./+TETEX
|
|
;;
|
|
esac
|
|
|
|
#
|
|
# Generate a +TEXCONFIG script sets the initial font and papersize
|
|
# settings for the teTeX installation.
|
|
#
|
|
case "${STAGE},$1" in
|
|
UNPACK,|UNPACK,+TEXCONFIG)
|
|
${CAT} > ./+TEXCONFIG << 'EOF'
|
|
#!@SH@
|
|
#
|
|
# +TEXCONFIG - default font and papersize settings for teTeX
|
|
#
|
|
# Usage: ./+TEXCONFIG FONTS [fontdir]
|
|
# ./+TEXCONFIG PAPER [papersize]
|
|
|
|
ECHO="@ECHO@"
|
|
TEST="@TEST@"
|
|
|
|
SELF=$0
|
|
ACTION=$1
|
|
: ${PKG_PREFIX=@PREFIX@}
|
|
|
|
TEXCONFIG="${PKG_PREFIX}/bin/texconfig-sys"
|
|
|
|
exitcode=0
|
|
case $ACTION in
|
|
FONTS)
|
|
# Set the default texfonts directory to the specified directory.
|
|
${TEST} ! -x ${TEXCONFIG} ||
|
|
${TEXCONFIG} font vardir "@VARBASE@/lib/texmf/fonts"
|
|
${TEST} ! -x ${TEXCONFIG} ||
|
|
${TEXCONFIG} font rw
|
|
;;
|
|
|
|
PAPER)
|
|
# Set the paper size for dvips and xdvi to the specified papersize.
|
|
PAPERSIZE="${2-@PAPERSIZE@}"
|
|
PAPERSIZE_dvips="$PAPERSIZE"
|
|
PAPERSIZE_xdvi="$PAPERSIZE"
|
|
case "$PAPERSIZE" in
|
|
letter) PAPERSIZE_xdvi="us" ;;
|
|
us) PAPERSIZE_dvips="letter" ;;
|
|
esac
|
|
${TEST} ! -x ${TEXCONFIG} ||
|
|
${TEXCONFIG} dvips paper $PAPERSIZE_dvips
|
|
${TEST} ! -x ${TEXCONFIG} ||
|
|
${TEXCONFIG} xdvi paper $PAPERSIZE_xdvi
|
|
;;
|
|
|
|
*)
|
|
${ECHO} "Usage: ./+TEXCONFIG FONTS [fontdir]"
|
|
${ECHO} " ./+TEXCONFIG PAPER [papersize]"
|
|
;;
|
|
esac
|
|
exit $exitcode
|
|
EOF
|
|
${CHMOD} +x ./+TEXCONFIG
|
|
;;
|
|
esac
|