archrelease: copy trunk to extra-x86_64
[arch-packages.git] / texlive-formatsextra / trunk / PKGBUILD
blob02b2b0efcda11d7e351c39aea10126a631143289
1 # Contributor: Firmicus <firmicus āt gmx dōt net>
2 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
4 pkgname=texlive-formatsextra
5 pkgver=2023.66186
6 _revnr=${pkgver#2023.}
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=('ffacdfacd9381cf3f21247d15cbd7b4e931855d9258edfe51fd23165cff30ca6'
22             'f969b60fed3a4cbd3fedc9e88e9385ef418f81bf69f958e8998a1898069fd50e'
23             '9a3fbec7f166156ec1483de769a8acff5c9146c699d74eec3f6bba5a0c4ffda5')
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