python-asciidoc/PKGBUILD

51 lines
1.6 KiB
Bash
Raw Permalink Normal View History

2024-10-16 01:04:36 +08:00
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=python-asciidoc
2024-10-16 01:07:52 +08:00
pkgver=10.2.1
2024-10-17 17:28:41 +08:00
pkgrel=2
2024-10-16 01:04:36 +08:00
pkgdesc="AsciiDoc is a text document format for writing things"
arch=('x86_64')
url="https://pypi.org/project/asciidoc"
license=('GPL')
depends=('python' 'libxslt' 'docbook-xsl')
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
2024-10-17 17:28:41 +08:00
source=(https://github.com/asciidoc-py/asciidoc-py/releases/download/${pkgver}/${pkgname#*-}-${pkgver}.tar.gz)
sha256sums=(aa7be8ae894f6cc1e67784d76ffa6c6b9e9f96efdc695db43c6bd63820e5072b)
2024-10-16 01:04:36 +08:00
prepare() {
cd ${pkgname#*-}-${pkgver}
2024-10-17 17:28:41 +08:00
sed -e '/^build: /a \\tpython3 -m build -wn' \
-e '/pip install/{s#pip install --root#installer -d#;s#\.$#dist/*.whl#}' \
-i Makefile.in
# https://github.com/asciidoc-py/asciidoc-py/issues/234
autoconf
2024-10-16 01:04:36 +08:00
}
build() {
cd ${pkgname#*-}-${pkgver}
2024-10-17 17:28:41 +08:00
${CONFIGURE} --docdir=/usr/share/doc/${pkgname#*-}-${pkgver}
make build
2024-10-16 01:04:36 +08:00
}
package() {
cd ${pkgname#*-}-${pkgver}
2024-10-17 17:28:41 +08:00
make DESTDIR=${pkgdir} install
make DESTDIR=${pkgdir} doc
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=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["platlib"])')
install -Dm0644 -t ${pkgdir}/${_platlib}/${pkgname}/ asciidoc/api.py
2024-10-16 01:04:36 +08:00
}