1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 # Contributor: Eli Schwartz <eschwartz@archlinux.org>
4 # Contributor: Florian Pritz <flo@xinu.at>
5 # Contributor: Chris Brannon <cmbrannon79@gmail.com>
6 # Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
7 # Contributor: Dan McGee <dan@archlinux.org>
8 # Contributor: Jaroslaw Rosiek <philosoph@interia.pl>
9 # Contributor: Darwin Bautista <djclue917@gmail.com>
10 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
15 pkgdesc='Text document format for short documents, articles, books and UNIX man pages'
17 url='https://asciidoc.org/'
19 depends=('python' 'libxslt' 'docbook-xsl')
20 checkdepends=('dblatex' 'graphviz' 'lilypond' 'python-pytest'{,-mock} 'source-highlight')
21 makedepends=(python-{build,installer,wheel} python-setuptools)
22 optdepends=('graphviz: graphviz-filter'
23 'lilypond: music-filter'
24 'imagemagick: music-filter'
25 'source-highlight: source-highlight-filter'
26 'dblatex: pdf generation'
27 'fop: alternative pdf generation'
28 'w3m: text generation'
29 'lynx: alternative text generation')
30 source=("https://github.com/asciidoc-py/asciidoc-py/releases/download/$pkgver/$pkgname-$pkgver.tar.gz")
31 sha256sums=('237b2ba5c35c0ae7ccd4cd44ebf1d87c20b2695dae01798954416d492ef7fa0e')
32 b2sums=('ed5db8fd1432b255e9c03e17805c26c76a42392c2ebeaf839b8c0aaaf38cd1a36d79b645ca4474503181200924df91218eb0997dd82335a30d6a0a1b35eb5730')
35 cd ${pkgname}-${pkgver}
37 -e '/^build: /a \\tpython3 -m build -wn' \
38 -e '/pip install/{s#pip install --root#installer -d#;s#\.$#dist/*.whl#}' \
40 # https://github.com/asciidoc-py/asciidoc-py/issues/234
45 cd ${pkgname}-${pkgver}
46 # https://github.com/asciidoc-py/asciidoc-py/issues/234#issuecomment-1045970138
48 --docdir /usr/share/doc/$pkgname \
54 cd ${pkgname}-${pkgver}
59 cd ${pkgname}-${pkgver}
60 make DESTDIR="${pkgdir}" install
61 make DESTDIR="${pkgdir}" docs
62 install -Dm0644 -t "$pkgdir/usr/share/man/man1/" doc/*.1
63 # ascidocapi is deprecated, but still included in 10.x on a "provisional" basis
64 local _platlib="$(python -c 'import sysconfig; print(sysconfig.get_paths()["platlib"])')"
65 install -Dm0644 -t "${pkgdir}/${_platlib}/${pkgname}/" asciidoc/api.py