summaryrefslogtreecommitdiff
path: root/source/t/tetex/jadetex.build
blob: 0d76f7e9f5513c34e8e0729d448fc142d3615729 (plain)
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
#!/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