void-packages/srcpkgs/python-docutils/template

63 lines
2.0 KiB
Bash

# Template file for 'python-docutils'
pkgname=python-docutils
version=0.16
revision=3
wrksrc="docutils-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
# docutils/writers/odf_odt/pygmentsformatter.py
depends="python python-Pygments"
short_desc="Python2 documentation utilities"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="custom:Public Domain, BSD-2-Clause, GPL-3.0-or-later, Python-2.0"
homepage="http://docutils.sourceforge.net"
distfiles="${PYPI_SITE}/d/docutils/docutils-${version}.tar.gz"
checksum=c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc
checkdepends+="$depends python3-Pygments"
alternatives="
docutils:rst2html:/usr/bin/rst2html.py2
docutils:rst2html4:/usr/bin/rst2html4.py2
docutils:rst2html5:/usr/bin/rst2html5.py2
docutils:rst2latex:/usr/bin/rst2latex.py2
docutils:rst2man:/usr/bin/rst2man.py2
docutils:rst2odt:/usr/bin/rst2odt.py2
docutils:rst2odt_prepstyles:/usr/bin/rst2odt_prepstyles.py2
docutils:rst2pseudoxml:/usr/bin/rst2pseudoxml.py2
docutils:rst2s5:/usr/bin/rst2s5.py2
docutils:rst2xetex:/usr/bin/rst2xetex.py2
docutils:rst2xml:/usr/bin/rst2xml.py2
docutils:rstpep2html:/usr/bin/rstpep2html.py2"
do_check() {
cd test
python3 alltests.py
}
post_install() {
vlicense COPYING.txt COPYING
}
python3-docutils_package() {
alternatives="
docutils:rst2html:/usr/bin/rst2html.py3
docutils:rst2html4:/usr/bin/rst2html4.py3
docutils:rst2html5:/usr/bin/rst2html5.py3
docutils:rst2latex:/usr/bin/rst2latex.py3
docutils:rst2man:/usr/bin/rst2man.py3
docutils:rst2odt:/usr/bin/rst2odt.py3
docutils:rst2odt_prepstyles:/usr/bin/rst2odt_prepstyles.py3
docutils:rst2pseudoxml:/usr/bin/rst2pseudoxml.py3
docutils:rst2s5:/usr/bin/rst2s5.py3
docutils:rst2xetex:/usr/bin/rst2xetex.py3
docutils:rst2xml:/usr/bin/rst2xml.py3
docutils:rstpep2html:/usr/bin/rstpep2html.py3"
depends="python3 python3-Pygments"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove "usr/bin/*3"
vmove "usr/lib/python3*"
vlicense COPYING.txt COPYING
}
}