termux-tools: Allow shorter forms in packages
[termux-packages] / packages / texlive / termux-install-tl.sh
1
2 TL_VERSION=2016
3 TL_ROOT=$PREFIX/opt/texlive
4
5 export TMPDIR=$PREFIX/tmp/
6 mkdir -p $TMPDIR/termux-tl-installer
7 cd $TMPDIR/termux-tl-installer
8
9 wget -N http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
10 tar xzfv install-tl-unx.tar.gz > flist
11
12 cd $(head -1 flist)
13
14 #patch install-tl
15 sed -E -i "s@/bin/sh@$PREFIX/bin/sh@" tlpkg/TeXLive/TLUtils.pm
16 #This patch won't be needed after the next version of fmtutil.pl is released.
17 sed -i "s@fmtutil-sys \$common_fmtutil_args --no-strict --all@fmtutil-sys \$common_fmtutil_args --all@" install-tl
18 cat > texlive_inst.profile << XXHEREXX
19
20 selected_scheme scheme-custom
21 TEXDIR ${TL_ROOT}/${TL_VERSION}
22 TEXMFCONFIG ~/.texlive${TL_VERSION}/texmf-config
23 TEXMFHOME ~/texmf
24 TEXMFLOCAL ${TL_ROOT}/texmf-local
25 TEXMFSYSCONFIG ${TL_ROOT}/${TL_VERSION}/texmf-config
26 TEXMFSYSVAR ${TL_ROOT}/${TL_VERSION}/texmf-var
27 TEXMFVAR ~/.texlive${TL_VERSION}/texmf-var
28 collection-basic 1
29 collection-latex 1
30 collection-luatex 1
31 in_place 0
32 option_adjustrepo 1
33 option_autobackup 1
34 option_backupdir tlpkg/backups
35 option_desktop_integration 0
36 option_doc 0
37 option_file_assocs 0
38 option_fmt 1
39 option_letter 0
40 option_menu_integration 1
41 option_path 0
42 option_post_code 1
43 option_src 0
44 option_sys_bin $PREFIX/bin
45 option_sys_info $PREFIX/local/share/info
46 option_sys_man $PREFIX/local/share/man
47 option_w32_multi_user 0
48 option_write18_restricted 1
49 portable 0
50
51 XXHEREXX
52
53 #start installer with a profile and premade binaries
54 perl ./install-tl --custom-bin=$TL_ROOT/${TL_VERSION}/bin/pkg --profile texlive_inst.profile
55
56 mkdir -p $PREFIX/etc/profile.d/
57
58 cat > $PREFIX/etc/profile.d/texlive.sh << XXHEREXX
59 export PATH=\$PATH:$TL_ROOT/${TL_VERSION}/bin/custom
60 export TMPDIR=$PREFIX/tmp/
61 XXHEREXX
62
63 #fix tlpkg
64 sed -E -i "s@/bin/sh@$PREFIX/bin/sh@" ${TL_ROOT}/${TL_VERSION}/tlpkg/TeXLive/TLUtils.pm
65
66 #source the environment
67 . $PREFIX/etc/profile.d/texlive.sh
68
69 #setup links
70 texlinks
71
72 rm -rdf $TMPDIR/termux-tl-installer