# Maintainer: Jesus E. pkgname=asciidoc pkgver=9.0.0rc2 _debver=9.0.0~rc2 _debrel=1 pkgrel=3 pkgdesc="Text document format for short documents, articles, books and UNIX man pages" arch=('any') url='https://asciidoc-py.github.io/' license=('GPL-2') depends=('python' 'libxslt' 'docbook-xsl') makedepends=('quilt') optdepends=('lynx: text generation') source=("${pkgname}-${pkgver}.tar.gz::https://deb.debian.org/debian/pool/main/a/asciidoc/asciidoc_${_debver}.orig.tar.gz" "https://deb.debian.org/debian/pool/main/a/asciidoc/asciidoc_${_debver}-${_debrel}.debian.tar.xz") sha512sums=('143f81628151a925c443094a855ef0ede30d41dcabe100948aa6b5a81afb9f7b14fc0bfb98757d55abf9bfffc6f6ae4ab4d3608c6e60bb9e96c6cdbb33150d14' '148525c17f49e1ae5a843314160b506e6681b2f1cabfd39827fb6a8489230a6a320a5536d5b1095829e962cc1a7936967db322e303b45b350274a1b749e45e43') prepare() { cd ${pkgname}-py3-${pkgver} if [[ $pkgver = $_debver ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian . quilt push -av fi sed -i 's|python3|python|g' $(grep -rIl 'python3') autoconf } build() { cd ${pkgname}-py3-${pkgver} ./configure \ --prefix=/usr \ --sysconfdir=/etc make } package() { cd ${pkgname}-py3-${pkgver} make install DESTDIR=${pkgdir} make docs DESTDIR=${pkgdir} install -Dm644 asciidocapi.py -t "${pkgdir}/usr/lib/python3.8/site-packages" install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}" }