Hello,
Here's a simple way to build a TeX Live package :
0) removepkg tetex tetex-doc
1) Get texlive-live.iso.zip file from TeX Live's website. It's quite fast to get it with the .torrent file, for example.
2) Unzip it, and then mount it as a iso9660 file:
# mount -t iso9660 -o loop image.iso /mnt/cdrom
3) Here, I think it's a better idea to use /usr/share rather than /opt for TeX Live prefix:
# cd /mnt/cdrom
# export TEXLIVE_INSTALL_PREFIX=/usr/share
4) Launch the install script :
# ./install-tl.sh
5) Then press 'D' and make sure you get the following:
o TEXDIR (main TeX directory): /usr/share/texmf
o TEXMFSYSVAR (systemwide config): /usr/share/texmf-var
o TEXMFLOCAL (systemwide styles etc.): /usr/share/texmf-local
o TEXMFHOME (personal styles etc.): $HOME/texmf
6) It's a good idea to use something else than the default scheme, which is quite big. Press 'S' and then choose what you prefer; I tend to think that 'G' (TeX Live medium scheme) is a good idea, as it's even smaller than the 'teTeX scheme'.
7) I personally decided to press 'O' and then 'S' in the main menu, in order to remove the source tree for fonts and macros.
8) Now, press 'I' to launch the installation. It doesn't compile anything so it's pretty fast.
9) The first problem here is that binaries are installed under /usr/share/bin/i386-linux... while they should be in /usr/share/texmf/bin, IMHO.
# cd /usr/share/texmf
# mkdir bin
# mv ../bin/i386-linux/* bin/
# rmdir ../bin/i386-linux
# rmdir ../bin
10) It's always a good idea to compress man pages :
# cd /usr/share/texmf/doc/man
# find . -type f -name "*.?" -exec gzip -9 {} \;
# for manpage in $(find . -type l) ; do
# ln -s $(readlink $manpage).gz $manpage.gz
# rm -f $manpage
# done
11) Now it should be a good idea to redefine the PATH and MANPATH variables:
# PATH="$PATH:/usr/share/texmf/bin"
# MANPATH="$MANPATH:/usr/share/texmf/doc/man"
12) Pat used the following lines in his teTeX buildscript. It's probably harmless to launch them:
# mv /root/.texmf-config /root/.texmf-config-$(mcookie)
# texconfig-sys confall
# texconfig-sys mode ljfour
# texconfig-sys dvips printcmd -
# texconfig-sys dvips add bjc600
# texconfig-sys dvips add stcolor
# texconfig-sys dvips add deskjet
# texconfig-sys dvips add ljet4
# texconfig-sys dvips -P bjc600 mode canonbjc
# texconfig-sys dvips -P stcolor mode epstylus
# texconfig-sys dvips -P deskjet mode deskjet
# texconfig-sys dvips -P ljet4 mode ljfour
# texconfig-sys font ro
# texconfig-sys rehash
If you use A4 format, then you'll have to launch that as well:
# texconfig-sys dvips paper a4
# texconfig-sys xdvi paper a4
13) I don't really know why /usr/share/texmf-var has special permissions... So I used the following lines to give more "habitual" permissions to this directory, as everything seems to be working fine.
# chmod 0755 /usr/share/texmf-var
# find /usr/share/texmf-var -type f -exec chmod 0644 {} \;
# find /usr/share/texmf-var -type d -exec chmod 0755 {} \;
Now, you can start to make a .tgz package:
14) I personally use
fakeroot to create a package, so 'root' is only needed to install the package.
$ cd /tmp/build
$ mkdir -p texlive/usr/share
$ cd texlive/usr/share
$ cp -a /usr/share/texmf .
$ cp -a /usr/share/texmf-dist .
$ cp -a /usr/share/texmf-doc .
$ cp -a /usr/share/texmf-local .
$ cp -a /usr/share/texmf-var .
$ cd ../..
$ mkdir -p etc/profile.d
$ cd etc/profile.d
$ cat > texlive.sh << EOF
#!/bin/sh
# Add PATH and MANPATH for TeX Live:
PATH="$PATH:/usr/share/texmf/bin"
MANPATH="$MANPATH:/usr/share/texmf/doc/man"
EOF
$ cat > texlive.csh << EOF
#!/bin/csh
# Add PATH and MANPATH for TeX Live:
setenv PATH $PATH:/usr/share/texmf/bin
setenv MANPATH $MANPATH:/usr/share/texmf/doc/man
EOF
$ chmod 0755 texlive.*sh
$ mkdir ../../install
$ cd ../../install
$ cat > slack-desc << EOF
texlive: texlive (the TeX Live distribution)
texlive:
texlive: TeX Live is an easy way to get up and running with TeX. It provides a
texlive: comprehensive TeX system which includes all the major TeX-related
texlive: programs, macro packages, and fonts that are free software, including
texlive: support for many languages around the world. This package uses the
texlive: "TeX Live medium scheme".
texlive:
texlive: Learn more about TeX Live at:
texlive:
http://www.tug.org/texlive/
texlive:
EOF
$ cd ..
$ fakeroot
# chown root:root . -R
# /sbin/makepkg -l y -c n /tmp/build/texlive-VERSION_NUMBER_HERE-i386-1.tgz
# exit
Then you may install the /tmp/build/texlive*.tgz package, umount /mnt/cdrom, remove the /tmp/build/texlive/ directory and the .iso file.
14) Make sure /etc/profile.d scripts are loaded, and enjoy LaTeX!
BTW, I obtain a 157M .tgz package for TeX Live, while tetex+tetex-doc packages were about 100M. I find this "acceptable"
.
---
Sorry if I made some mistakes. English is not my mother tongue...