mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-03 11:22:56 +02:00
python-docutils: use alternatives
This commit is contained in:
parent
668855f4ae
commit
290f012f3b
1 changed files with 27 additions and 20 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'python-docutils'
|
# Template file for 'python-docutils'
|
||||||
pkgname=python-docutils
|
pkgname=python-docutils
|
||||||
version=0.12
|
version=0.12
|
||||||
revision=2
|
revision=3
|
||||||
noarch=yes
|
noarch=yes
|
||||||
wrksrc="docutils-${version}"
|
wrksrc="docutils-${version}"
|
||||||
build_style=python-module
|
build_style=python-module
|
||||||
|
@ -16,35 +16,42 @@ license="Public Domain, 2-clause-BSD, GPL-3, PSF"
|
||||||
distfiles="${PYPI_SITE}/d/docutils/docutils-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/d/docutils/docutils-${version}.tar.gz"
|
||||||
checksum=c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa
|
checksum=c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa
|
||||||
|
|
||||||
pre_build() {
|
alternatives="
|
||||||
# remove shebang from library files
|
docutils:rst2html:/usr/bin/rst2html.py2.7
|
||||||
find docutils/{utils,writers} -type f -name '*.py' -exec sed -i '/^#!/d' {} +
|
docutils:rst2latex:/usr/bin/rst2latex.py2.7
|
||||||
}
|
docutils:rst2man:/usr/bin/rst2man.py2.7
|
||||||
post_install() {
|
docutils:rst2odt:/usr/bin/rst2odt.py2.7
|
||||||
# fix name conflict and remove .py suffix
|
docutils:rst2odt_prepstyles:/usr/bin/rst2odt_prepstyles.py2.7
|
||||||
for f in 2html 2latex 2man 2odt 2odt_prepstyles 2pseudoxml 2s5 2xetex 2xml pep2html; do
|
docutils:rst2pseudoxml:/usr/bin/rst2pseudoxml.py2.7
|
||||||
rm -f ${DESTDIR}/usr/bin/rst${f}.py
|
docutils:rst2s5:/usr/bin/rst2s5.py2.7
|
||||||
vbin build-2.7/scripts-2.7/rst${f}{.py,}
|
docutils:rst2xetex:/usr/bin/rst2xetex.py2.7
|
||||||
vbin build-3.4/scripts-3.4/rst${f}{.py,3}
|
docutils:rst2xml:/usr/bin/rst2xml.py2.7
|
||||||
done
|
docutils:rstpep2html:/usr/bin/rstpep2html.py2.7"
|
||||||
|
|
||||||
# install licenses
|
post_install() {
|
||||||
vlicense COPYING.txt
|
vlicense COPYING.txt COPYING
|
||||||
vlicense licenses/BSD-2-Clause.txt
|
|
||||||
vlicense licenses/python-2-1-1.txt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
python3.4-docutils_package() {
|
python3.4-docutils_package() {
|
||||||
|
alternatives="
|
||||||
|
docutils:rst2html:/usr/bin/rst2html.py3.4
|
||||||
|
docutils:rst2latex:/usr/bin/rst2latex.py3.4
|
||||||
|
docutils:rst2man:/usr/bin/rst2man.py3.4
|
||||||
|
docutils:rst2odt:/usr/bin/rst2odt.py3.4
|
||||||
|
docutils:rst2odt_prepstyles:/usr/bin/rst2odt_prepstyles.py3.4
|
||||||
|
docutils:rst2pseudoxml:/usr/bin/rst2pseudoxml.py3.4
|
||||||
|
docutils:rst2s5:/usr/bin/rst2s5.py3.4
|
||||||
|
docutils:rst2xetex:/usr/bin/rst2xetex.py3.4
|
||||||
|
docutils:rst2xml:/usr/bin/rst2xml.py3.4
|
||||||
|
docutils:rstpep2html:/usr/bin/rstpep2html.py3.4"
|
||||||
noarch=yes
|
noarch=yes
|
||||||
depends="python3.4"
|
depends="python3.4"
|
||||||
pycompile_version="3.4"
|
pycompile_version="3.4"
|
||||||
pycompile_module="docutils"
|
pycompile_module="docutils"
|
||||||
short_desc="${short_desc/Python2/Python3.4}"
|
short_desc="${short_desc/Python2/Python3.4}"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/bin/*3
|
vmove usr/bin/*3.4
|
||||||
vmove usr/lib/python3.4
|
vmove usr/lib/python3.4
|
||||||
vlicense COPYING.txt
|
vlicense COPYING.txt COPYING
|
||||||
vlicense licenses/BSD-2-Clause.txt
|
|
||||||
vlicense licenses/python-2-1-1.txt
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue