jobextra/asciidoc/PKGBUILD

65 lines
2.1 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=asciidoc
pkgver=10.1.4
pkgrel=01
pkgdesc='Text document format for short documents, articles, books and UNIX man pages'
arch=('any')
url='https://asciidoc.org/'
depends=('python' 'libxslt' 'docbook-xsl')
checkdepends=('dblatex' 'graphviz' 'lilypond' 'python-pytest'{,-mock} 'source-highlight')
makedepends=('python-pip')
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=("https://github.com/asciidoc-py/asciidoc-py/releases/download/$pkgver/$pkgname-$pkgver.tar.gz")
prepare() {
cd ${pkgname}-${pkgver}
# https://github.com/asciidoc-py/asciidoc-py/issues/201#issuecomment-1047494681
# sed -i -e '/pytest$/s!$! tests/test_utils.py!' Makefile.in
# # https://github.com/asciidoc-py/asciidoc-py/issues/234
autoconf
}
build() {
cd ${pkgname}-${pkgver}
./configure \
--docdir /usr/share/doc/$pkgname \
--prefix=/usr
make build
make manpages
}
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
}
#---- license gpg-key sha256sums ----
license=('GPL')
sha256sums=(e4da7cc2af7fa12029156c0788fde2a53db1352d7dcb3e674a9d546b3bdba93f) # asciidoc-10.1.4.tar.gz