This file is indexed.

preinst is in dvi2ps 4.1j-3.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

  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
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#! /bin/sh
# preinst script for dvi2ps
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <new-preinst> `install'
#        * <new-preinst> `install' <old-version>
#        * <new-preinst> `upgrade' <old-version>
#        * <old-preinst> `abort-upgrade' <new-version>

etcdir=/etc/texmf/dvi2ps

comp_fontdesc(){
valfp=`dpkg -s dvi2ps | grep fontdesc | awk '{print $2}'`
valfi=`md5sum ${etcdir}/fontdesc | awk '{print $1}'`
if [ X"${valfp}" = X"${valfi}" ]; then
fflag=unmodified
else
fflag=modified
fi
}

comp_conf(){
valcp=`dpkg -s dvi2ps | grep configk | awk '{print $2}'`
valci=`md5sum ${etcdir}/configk | awk '{print $1}'`
if [ X"${valcp}" = X"${valci}" ]; then
cflag=unmodified
else
cflag=modified
fi
}

check_fontdesc(){
comp_fontdesc
if [ X"${fflag}" = Xmodified ] && [ -f ${etcdir}/fontdesc ] && [ X"`grep 3.2j ${etcdir}/fontdesc`" != X"# 3.2j" ]; then
mv -f ${etcdir}/fontdesc ${etcdir}/fontdesc.disable
cat > ${etcdir}/fontdesc <<EOF
# dvi2ps font description file for Debian
# 3.2j
##########################################################################
#
# printer spec
#
# predefined fontdesc files for printers are
# LW16, LWII, PS200, PS360, PS400, PS600, PS720, RichoSP10, SPARC.
## NOTE: "//printer/PS600" doesn't work at present!
fontdesc	printer/PS600
#
#resolution	600
#define	mode	ljfour
#define	bk	mor2

fontdesc	config\$kpse
fontdesc	header

##########################################################################
#
# font selection for japanese
#
# if you use Japanese PostScript printer or ghostscript with
# Japanese fonts support, use *-bikanji instead of *-vflkanji.
#
#	NTT jTeX fonts
#
#fontdesc	fonts\$kpse/ntt-bitmap
#fontdesc	fonts\$kpse/ntt-vflkanji
fontdesc	fonts\$kpse/ntt-bikanji
#
#	pTeX / ASCII jtex
#
#fontdesc	fonts\$kpse/a2n
#fontdesc	fonts\$kpse/asc-vflkanji
fontdesc	fonts\$kpse/asc-bikanji

##########################################################################
#
# font selection
#
# you need to install tetex-extra for the next two settings to work.
# if you want to use BlueSky postscript cm fonts, uncomment the next line.
#fontdesc	fonts\$kpse/fonts-t1
# if you want to use PSNFSS fonts, uncomment out the next line.
#fontdesc	fonts\$kpse/psfonts
fontdesc	fonts\$kpse/fonts-bitmap
fontdesc	fonts\$kpse/generate
EOF
fi
}

check_configk(){
comp_conf
if [ X"${cflag}" = Xmodified ] && [ -f ${etcdir}/configk ] && [ -n "`grep /var/spool/texmf ${etcdir}/configk`" ]; then
mv -f ${etcdir}/configk ${etcdir}/configk.disable
cat > ${etcdir}/configk <<EOF
define	tmf	/usr/{local/share,share}/texmf/fonts
#define	enc	reencode/
define	vmf	/var/cache/fonts
cconvdir	cconv
vfontcap	/etc/vfontcap
EOF
fi
}
case "$1" in
    install|upgrade)
	check_fontdesc
	check_configk
    ;;

    abort-upgrade)
    ;;

    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0