termux-packages/packages/texlive/termux-install-tl.sh
Henrik Grimler 58a466a46d Texlive: fix #1068, #1069 by upgrading to texlive 2017 (#1072)
* texlive: enable makeindex and put man files and headers in proper location.

* texlive: use historic install-tl-unx.tar.gz version. (fixes #1068, #1069).

Also include profile.d/texlive.sh in package instead of creating it in termux-install-tl.

* texlive: remove files from old installation script preinst.

* texlive: remove bin/custom and texmf-dist prerm

* texlive: improve sed patch.

Otherwise, running termux-install-tl twice fails.

* texlive: use proper sys-man dir and sys-info dir.

* texlive: propose me as maintainer

* texlive: upgrade to 2017

* texlive: add gnupg to dep to allow tlmgr to check downloaded packages
2017-06-07 00:43:15 +02:00

66 lines
1.8 KiB
Bash
Executable File

TL_VERSION=2017
TL_ROOT=$PREFIX/opt/texlive
export TMPDIR=$PREFIX/tmp/
mkdir -p $TMPDIR/termux-tl-installer
cd $TMPDIR/termux-tl-installer
wget ftp://ftp.tug.org/texlive/historic/$TL_VERSION/install-tl-unx.tar.gz -O install-tl-unx.tar.gz
tar xzfv install-tl-unx.tar.gz > flist
cd $(head -1 flist)
#patch install-tl
sed -E -i "s@\`/bin/sh@\`$PREFIX/bin/sh@g" tlpkg/TeXLive/TLUtils.pm
cat > texlive_inst.profile << XXHEREXX
selected_scheme scheme-basic
TEXDIR $TL_ROOT/$TL_VERSION
TEXMFCONFIG ~/.texlive$TL_VERSION/texmf-config
TEXMFHOME ~/texmf
TEXMFLOCAL $TL_ROOT/texmf-local
TEXMFSYSCONFIG $TL_ROOT/$TL_VERSION/texmf-config
TEXMFSYSVAR $TL_ROOT/$TL_VERSION/texmf-var
TEXMFVAR ~/.texlive$TL_VERSION/texmf-var
collection-basic 1
collection-latex 1
collection-luatex 1
instopt_adjustpath 0
instopt_adjustrepo 1
instopt_letter 0
instopt_portable 0
instopt_write18_restricted 1
tlpdbopt_autobackup 1
tlpdbopt_backupdir tlpkg/backups
tlpdbopt_create_formats 1
tlpdbopt_desktop_integration 0
tlpdbopt_file_assocs 0
tlpdbopt_generate_updmap 0
tlpdbopt_install_docfiles 0
tlpdbopt_install_srcfiles 0
tlpdbopt_post_code 1
tlpdbopt_sys_bin $PREFIX/bin
tlpdbopt_sys_info $PREFIX/share/info
tlpdbopt_sys_man $PREFIX/share/man
tlpdbopt_w32_multi_user 0
XXHEREXX
#start installer with a profile and premade binaries
perl ./install-tl --custom-bin=$TL_ROOT/${TL_VERSION}/bin/pkg --profile texlive_inst.profile
#fix tlpkg
sed -E -i "s@\`/bin/sh@\`$PREFIX/bin/sh@g" ${TL_ROOT}/${TL_VERSION}/tlpkg/TeXLive/TLUtils.pm
#fix shebangs
sed -i -E "1 s@^#\!(.*)/[sx]?bin/(.*)@#\!$PREFIX/bin/\2@" ${TL_ROOT}/${TL_VERSION}/texmf-dist/web2c/*
sed -i -E "1 s@^#\!(.*)/[sx]?bin/(.*)@#\!$PREFIX/bin/\2@" ${TL_ROOT}/${TL_VERSION}/bin/custom/*
#source the environment
. $PREFIX/etc/profile.d/texlive.sh
#setup links
texlinks
rm -rf $TMPDIR/termux-tl-installer