db-move: moved xdg-desktop-portal-gnome from [testing] to [extra] (x86_64)
[arch-packages.git] / texlive-latexextra / repos / extra-any / PKGBUILD
blob967870caa605bb2dd8929891c9c141ca747e36e0
1 # Maintainer: Firmicus <firmicus āt gmx dōt net>
2 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
4 pkgname=texlive-latexextra
5 pkgver=2023.66551
6 _revnr=${pkgver#2023.}
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=('6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95'
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 pagelayout/pagelayoutapi
67 pagelayout/textestvis
68 pax/pdfannotextractor.pl
69 perltex/perltex.pl
70 pygmentex/pygmentex.py
71 splitindex/splitindex.pl
72 svn-multi/svn-multi.pl
73 vpe/vpe.pl
74 webquiz/webquiz.py
75 wordcount/wordcount.sh
76 yplan/yplan
78     install -m755 -d "$pkgdir"/usr/bin
79     for _script in ${_linked_scripts}; do
80         _scriptbase=$(basename $_script)
81         _scriptbase=${_scriptbase%.*}
82         ln -s /usr/share/texmf-dist/scripts/${_script} "${pkgdir}/usr/bin/${_scriptbase}"
83     done