51 lines
1.6 KiB
Bash
51 lines
1.6 KiB
Bash
# 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
|
|
pkgver=10.2.1
|
|
pkgrel=2
|
|
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')
|
|
source=(https://github.com/asciidoc-py/asciidoc-py/releases/download/${pkgver}/${pkgname#*-}-${pkgver}.tar.gz)
|
|
sha256sums=(aa7be8ae894f6cc1e67784d76ffa6c6b9e9f96efdc695db43c6bd63820e5072b)
|
|
|
|
prepare() {
|
|
cd ${pkgname#*-}-${pkgver}
|
|
|
|
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
|
|
}
|
|
|
|
build() {
|
|
cd ${pkgname#*-}-${pkgver}
|
|
|
|
${CONFIGURE} --docdir=/usr/share/doc/${pkgname#*-}-${pkgver}
|
|
|
|
make build
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname#*-}-${pkgver}
|
|
|
|
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
|
|
|
|
}
|