OCaml 4.14.0 rebuild
[arch-packages.git] / texlive-latexextra / trunk / PKGBUILD
blob28439915e15a75d99c80dcea5bf520501e1ace5e
1 # Maintainer: Firmicus <firmicus āt gmx dōt net>
2 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
4 pkgname=texlive-latexextra
5 pkgver=2022.63034
6 _revnr=${pkgver#2022.}
7 pkgrel=1
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   'inkscape: required for svg package'
16   'java-environment: to use pdfannotextractor'
17   'python-pygments: for pygmentex'
18   'texlive-genericextra: required for calctab package'
19   'texlive-pictures: required for overpic package'
21 groups=('texlive-most')
22 url='http://tug.org/texlive/'
23 source=("https://sources.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip"
24         "$pkgname.maps"
25         "$pkgname.fmts")
26 options=('!emptydirs')
27 sha256sums=('b1b2f1a5ac580890cfe5145f9aed064a6af57e87109e5ef991cc093e029c8fdf'
28             'd53750a03a52472a1c7c5ba5142959ba382a5d69215471691c0b12c3663950ce'
29             '828a9cf082b9a89a4aa0eec402a9c32b8056bb873e4a5dc92ce60aec2ea69435')
31 build() {
32    for p in *.tar.xz; do
33            bsdtar -xf $p
34    done
35    rm -rf {tlpkg,doc,source} || true
38 package() {
39    install -m755 -d "$pkgdir"/var/lib/texmf/arch/installedpkgs
40    sed -i '/^#/d' CONTENTS
41    install -m644 CONTENTS "$pkgdir"/var/lib/texmf/arch/installedpkgs/${pkgname}_${_revnr}.pkgs
42    install -m644 $pkgname.maps "$pkgdir"/var/lib/texmf/arch/installedpkgs/
43    install -m755 -d "$pkgdir"/usr/share
44    wanteddirs=$(for d in *; do test -d $d && [[ $d != texmf* ]] && echo $d; done) || true
45    for dir in $wanteddirs; do
46      find $dir -type d -exec install -d -m755 "$pkgdir"/usr/share/texmf-dist/'{}' \;
47      find $dir -type f -exec install -m644 '{}' "$pkgdir"/usr/share/texmf-dist/'{}' \;
48    done
49    if [[ -d texmf-dist ]]; then
50      find texmf-dist -type d -exec install -d -m755 "$pkgdir"/usr/share/'{}' \;
51      find texmf-dist -type f -exec install -m644 '{}' "$pkgdir"/usr/share/'{}' \;
52    fi
53    if [[ -d "$pkgdir"/usr/share/texmf-dist/scripts ]]; then
54      find "$pkgdir"/usr/share/texmf-dist/scripts -type f -exec chmod a+x '{}' \;
55    fi
57     #add symlinks that were in texlive-bin:
58     _linked_scripts="
59 authorindex/authorindex
60 exceltex/exceltex
61 glossaries/makeglossaries
62 glossaries/makeglossaries-lite.lua
63 hyperxmp/hyperxmp-add-bytecount.pl
64 l3build/l3build.lua
65 makedtx/makedtx.pl
66 pax/pdfannotextractor.pl
67 perltex/perltex.pl
68 pygmentex/pygmentex.py
69 splitindex/splitindex.pl
70 svn-multi/svn-multi.pl
71 vpe/vpe.pl
72 webquiz/webquiz.py
73 wordcount/wordcount.sh
74 yplan/yplan
76     install -m755 -d "$pkgdir"/usr/bin
77     for _script in ${_linked_scripts}; do
78         _scriptbase=$(basename $_script)
79         _scriptbase=${_scriptbase%.*}
80         ln -s /usr/share/texmf-dist/scripts/${_script} "${pkgdir}/usr/bin/${_scriptbase}"
81     done