summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6f43894d3b1beb8f63394de2b1c5a5596587a6ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: xeruf <27jf at pm dot me>

_pkgname=context
pkgname=${_pkgname}
pkgver=2022.09.11_20.44
pkgrel=1
pkgdesc='ConTeXt LMTX, the Lean and Mean TeX eXperience with Lua, MetaPost, TeX, and XML'
arch=('x86_64')
url="https://wiki.contextgarden.net/Installation"
license=(GPL)
depends=()
replaces=(context-bin)
provides=(${_pkgname} ${_pkgname}-lmtx)
conflicts=(${_pkgname})
optdepends=()
source=("http://lmtx.pragma-ade.nl/install-lmtx/context-linux-64.zip")
sha256sums=(SKIP)
install=${_pkgname}.install

prepare() {
  cd "${srcdir}"
  chmod +x install.sh
  ./install.sh
}

package() {
  context="${pkgdir}/usr/share/texmf-dist"
  cd "tex"

  install -d "$context"
  cp -r texmf texmf-context "$context"
  install -Dt "${pkgdir}/usr/local/bin" texmf-linux-64/bin/*
}

pkgver() {
  # TODO use https://wiki.contextgarden.net/LMTX#How_to_check_for_newer_versions.3F
  cat "${srcdir}/tex/texmf-context/tex/context/base/mkxl/context.mkxl" |
    grep "def\\\\contextversion" |
    sed 's/^.*{\(.*\)}.*$/\1/' |
    tr ' :' '_.'
}