#!/bin/sh # jadetex build/install script taken from Stuart Winter's build # script for linuxdoc-tools. # Sanity check: if [ -z "$SLKCFLAGS" ]; then echo "This script is only meant to be run from tetex.SlackBuild," echo "so I hope you know what you are doing." echo -n "Hit Enter to continue anyway... " read junk fi JADETEXVER=3.13 # sgmltools-lite's POSTINSTALL document suggests that if jadetex # is eating huge amounts of RAM, we need to configure it thusly: # Slackware's t/tetex package contains this config file (without the # .jadetext config) so I won't overwrite it here. However, we may # wish to append this configuration to an install script for # this package; but it'd get overwritten by new versions of # t/tetex. Perhaps this configuration could be added to the tetex package? cat << EOF >> /usr/share/texmf/web2c/texmf.cnf % options for jadetex: hash_extra.jadetex = 15000 pool_size.jadetex = 200000 max_strings.jadetex = 50000 save_size.jadetex = 15000 EOF chmod 644 /usr/share/texmf/web2c/texmf.cnf # Extract source: cd $TMP rm -rf jadetex-$JADETEXVER tar xvf $CWD/jadetex-$JADETEXVER.tar.gz || exit 1 cd jadetex-$JADETEXVER chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; # Build: # The install phase breaks if we use tex or etex, so we use latex instead: sed -ie "s?tex -ini?latex -ini?" Makefile make $NUMJOBS || make || exit 1 # Install onto filesystem: make install || exit 1 # Create jadetex symlinks to the TeTex binaries: ( cd /usr/share/texmf/bin rm -f jadetex pdfjadetex ln -sf latex jadetex ln -sf pdfetex pdfjadetex ) # Update the references to jadetex & pdfjadetex: mktexlsr # Install man pages - these are missed by the Makefile: mkdir -p /usr/share/texmf/man/man1 install -m644 jadetex.1 pdfjadetex.1 /usr/share/texmf/man/man1 gzip -9 /usr/share/texmf/man/man1/jadetex.1 gzip -9 /usr/share/texmf/man/man1/pdfjadetex.1