# POWER Maintainer: Alexander Baldeck # Maintainer: Levente Polyak # Maintainer: Caleb Maclennan # Contributor: Eli Schwartz # Contributor: Florian Pritz # Contributor: Chris Brannon # Contributor: Geoffroy Carrier # Contributor: Dan McGee # Contributor: Jaroslaw Rosiek # Contributor: Darwin Bautista # Contributor: Daniel J Griffiths pkgname=asciidoc pkgver=10.2.1 pkgrel=1.1 pkgdesc='Text document format for short documents, articles, books and UNIX man pages' arch=(any) url='https://asciidoc-py.github.io' _url='https://github.com/asciidoc-py/asciidoc-py' license=(GPL-2.0-or-later) depends=(docbook-xsl libxslt python) checkdepends=(dblatex graphviz lilypond python-pytest{,-mock} source-highlight) makedepends=(python-{build,installer,wheel} python-setuptools) optdepends=('graphviz: graphviz-filter' 'lilypond: music-filter' 'imagemagick: music-filter' 'source-highlight: source-highlight-filter' 'dblatex: pdf generation' 'fop: alternative pdf generation' 'w3m: text generation' 'lynx: alternative text generation') source=("$_url/releases/download/$pkgver/$pkgname-$pkgver.tar.gz") sha256sums=('aa7be8ae894f6cc1e67784d76ffa6c6b9e9f96efdc695db43c6bd63820e5072b') b2sums=('9e15eb5d40384fe586a6148e53e03e73a6958061841843f7b32b4209a15477f97a6547ea1cb48d23b5d4c9ee5add1bfa87d53c1bfbc14c10f31397ebeb86ba39') prepare() { cd ${pkgname}-${pkgver} sed -i \ -e '/^build: /a \\tpython3 -m build -wn' \ -e '/pip install/{s#pip install --root#installer -d#;s#\.$#dist/*.whl#}' \ Makefile.in # https://github.com/asciidoc-py/asciidoc-py/issues/234 autoconf } build() { cd ${pkgname}-${pkgver} # https://github.com/asciidoc-py/asciidoc-py/issues/234#issuecomment-1045970138 ./configure \ --docdir /usr/share/doc/$pkgname \ --prefix /usr make build } check() { cd ${pkgname}-${pkgver} make test } package() { cd ${pkgname}-${pkgver} make DESTDIR="${pkgdir}" install make DESTDIR="${pkgdir}" docs install -Dm0644 -t "$pkgdir/usr/share/man/man1/" doc/*.1 # ascidocapi is deprecated, but still included in 10.x on a "provisional" basis local _platlib="$(python -c 'import sysconfig; print(sysconfig.get_paths()["platlib"])')" install -Dm0644 -t "${pkgdir}/${_platlib}/${pkgname}/" asciidoc/api.py }