On Mon, Dec 18, 2006 at 09:47 +0100, Frank Küster wrote: > Frank Küster <[EMAIL PROTECTED]> wrote: > > > Or wait. We could > > > > - ship our default config.ps in /usr/share/tetex-bin > > > > - in postinst, run the equivalent of the libpaper hook on this file, > > creating a temporary file which differs from the default one only by > > the papersize setting > > > > - use ucf to install the temporary file in /etc/texmf/dvips/ > > To put a little flesh on this: > > - paperconfig/libpaper.postinst call the hook without parameters > > - TeX packages' postinsts call it with option "packagename" > > and the script does the following (example only for dvips) > > if [ -n "$1" ]; then > sourcedir=/usr/share/$1 > else > sourcedir=/etc/texmf/dvips > fi > > papersize=`ask libpaper` > > case $papersize in > list|of|known|papers) > : > ;; > *) > error_message #debconf or stderr? > exit 0 > esac > > sed -e 's/\($pattern_for_papersize\)[anysize]*/\1 $papersize/ \ > $sourcdir/config.ps > tempfile > ucf tempfile /etc/texmf/dvips/config.ps
Looks good in general. Some brief comments: - editing config.ps is non-trivial; there is readymade ed-code in texconfig for this, though - maybe one could make use of texconfig for editing the files: . ship files somewhere in /use/share/$packagename . copy files to tmpdir in proper TDS structure (see tcfmgr.map) . edit files with 'TEXMFCONFIG=$tmpdir texconfig' . install files with ucf - actually neither 'a4' nor 'letter' as defined in config.ps should not be used as default paper sizes; one should use A4size or letterSize; see the end of '4.2 Configuration file paper size command' in the dvips documentation (texdoc dvips) The latter point might actually be a bug in texconfig and/or the default config.ps. cheerio ralf