archrelease: copy trunk to extra-x86_64
[arch-packages.git] / texlive-formatsextra / repos / extra-any / PKGBUILD
blob256cff0c09ac271fedccded81f27a9535c7be8d5
1 # Contributor: Firmicus <firmicus āt gmx dōt net>
2 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
4 pkgname=texlive-formatsextra
5 pkgver=2021.57972
6 _revnr=${pkgver#2021.}
7 pkgrel=1
8 pkgdesc="TeX Live - collection of extra TeX 'formats'"
9 license=('GPL')
10 arch=(any)
11 depends=('texlive-core')
12 groups=('texlive-most')
13 url='http://tug.org/texlive/'
14 source=("https://sources.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip"
15         "${pkgname}.maps"
16         "${pkgname}.fmts")
17 options=('!emptydirs')
18 provides=('texlive-htmlxml')
19 conflicts=('texlive-htmlxml')
20 replaces=('texlive-htmlxml')
21 sha256sums=('641660f85062d70d715b11e8bd404558d1618a02ce95e1d54792f01e3aa8b80a'
22             'f969b60fed3a4cbd3fedc9e88e9385ef418f81bf69f958e8998a1898069fd50e'
23             'edee1d8b46005847381dbf20afacad6d14f3d59406facdc609c92d9e20ed6df2')
25 build() {
26    cd "$srcdir"
27    for p in *.tar.xz; do
28        case $p in
29            aleph.*|lambda.*|omega.*)
30                ;;
31            *)
32                bsdtar -xf $p
33                ;;
34        esac
35    done
36    rm -rf {tlpkg,doc,source} || true
39 package() {
40    cd "$srcdir"
41    install -m755 -d "$pkgdir"/var/lib/texmf/arch/installedpkgs
42    sed -i '/^#/d' CONTENTS
43    install -m644 CONTENTS "$pkgdir"/var/lib/texmf/arch/installedpkgs/${pkgname}_${_revnr}.pkgs
44    install -m644 "${pkgname}.fmts" "$pkgdir"/var/lib/texmf/arch/installedpkgs/
45    install -m755 -d "$pkgdir"/usr/share
46    wanteddirs=$(for d in *; do test -d $d && [[ $d != texmf* ]] && echo $d; done) || true
47    for dir in $wanteddirs; do
48      find $dir -type d -exec install -d -m755 "$pkgdir"/usr/share/texmf-dist/'{}' \;
49      find $dir -type f -exec install -m644 '{}' "$pkgdir"/usr/share/texmf-dist/'{}' \;
50    done
51    if [[ -d texmf-dist ]]; then
52      find texmf-dist -type d -exec install -d -m755 "$pkgdir"/usr/share/'{}' \;
53      find texmf-dist -type f -exec install -m644 '{}' "$pkgdir"/usr/share/'{}' \;
54    fi
55    if [[ -d "$pkgdir"/usr/share/texmf-dist/scripts ]]; then
56      find "$pkgdir"/usr/share/texmf-dist/scripts -type f -exec chmod a+x '{}' \;
57    fi