OCaml 4.13.1 rebuild, fixes FS#72998
[arch-packages.git] / texlive-latexextra / repos / extra-any / PKGBUILD
blob29a0eb10fdd21e8ab4b0780007b69d35c5abc2c1
1 # Maintainer: Firmicus <firmicus āt gmx dōt net>
2 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
4 pkgname=texlive-latexextra
5 pkgver=2021.58668
6 _revnr=${pkgver#2021.}
7 pkgrel=2
8 pkgdesc="TeX Live - Large collection of add-on packages for LaTeX"
9 license=('GPL')
10 arch=(any)
11 depends=('texlive-core'
12          'perl-file-which' # for pdfannotextractor
13         )
14 optdepends=(
15   'python-pygments: for pygmentex'
16   'texlive-genericextra: to use the calctab package'
17   'texlive-pictures: to use the package overpic'
18   'java-environment: to use pdfannotextractor'
20 groups=('texlive-most')
21 url='http://tug.org/texlive/'
22 source=("https://sources.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip"
23         "$pkgname.maps"
24         "$pkgname.fmts")
25 options=('!emptydirs')
26 sha256sums=('9c2ef3ce71ad656df7644770a2c4aec27c4ea9375421d0ab3b56cb5b25a06287'
27             'd53750a03a52472a1c7c5ba5142959ba382a5d69215471691c0b12c3663950ce'
28             '828a9cf082b9a89a4aa0eec402a9c32b8056bb873e4a5dc92ce60aec2ea69435')
30 build() {
31    for p in *.tar.xz; do
32            bsdtar -xf $p
33    done
34    rm -rf {tlpkg,doc,source} || true
37 package() {
38    install -m755 -d "$pkgdir"/var/lib/texmf/arch/installedpkgs
39    sed -i '/^#/d' CONTENTS
40    install -m644 CONTENTS "$pkgdir"/var/lib/texmf/arch/installedpkgs/${pkgname}_${_revnr}.pkgs
41    install -m644 $pkgname.maps "$pkgdir"/var/lib/texmf/arch/installedpkgs/
42    install -m755 -d "$pkgdir"/usr/share
43    wanteddirs=$(for d in *; do test -d $d && [[ $d != texmf* ]] && echo $d; done) || true
44    for dir in $wanteddirs; do
45      find $dir -type d -exec install -d -m755 "$pkgdir"/usr/share/texmf-dist/'{}' \;
46      find $dir -type f -exec install -m644 '{}' "$pkgdir"/usr/share/texmf-dist/'{}' \;
47    done
48    if [[ -d texmf-dist ]]; then
49      find texmf-dist -type d -exec install -d -m755 "$pkgdir"/usr/share/'{}' \;
50      find texmf-dist -type f -exec install -m644 '{}' "$pkgdir"/usr/share/'{}' \;
51    fi
52    if [[ -d "$pkgdir"/usr/share/texmf-dist/scripts ]]; then
53      find "$pkgdir"/usr/share/texmf-dist/scripts -type f -exec chmod a+x '{}' \;
54    fi
56     #add symlinks that were in texlive-bin:
57     _linked_scripts="
58 authorindex/authorindex
59 exceltex/exceltex
60 glossaries/makeglossaries
61 glossaries/makeglossaries-lite.lua
62 hyperxmp/hyperxmp-add-bytecount.pl
63 l3build/l3build.lua
64 makedtx/makedtx.pl
65 pax/pdfannotextractor.pl
66 perltex/perltex.pl
67 pygmentex/pygmentex.py
68 splitindex/splitindex.pl
69 svn-multi/svn-multi.pl
70 vpe/vpe.pl
71 webquiz/webquiz.py
72 wordcount/wordcount.sh
73 yplan/yplan
75     install -m755 -d "$pkgdir"/usr/bin
76     for _script in ${_linked_scripts}; do
77         _scriptbase=$(basename $_script)
78         _scriptbase=${_scriptbase%.*}
79         ln -s /usr/share/texmf-dist/scripts/${_script} "${pkgdir}/usr/bin/${_scriptbase}"
80     done