void-packages/srcpkgs/python-Sphinx/template

69 lines
2.2 KiB
Bash
Raw Normal View History

2014-09-05 18:29:49 +00:00
# Template file for 'python-Sphinx'
pkgname=python-Sphinx
2015-04-01 11:24:00 +00:00
version=1.3.1
revision=1
2014-09-05 18:29:49 +00:00
noarch=yes
wrksrc="Sphinx-${version}"
python_versions="2.7 3.4"
2014-09-24 07:21:26 +00:00
hostmakedepends="
python-setuptools python3.4-setuptools python-docutils python3.4-docutils
2015-04-01 11:24:00 +00:00
python-Jinja2 python3.4-Jinja2 python-Pygments python3.4-Pygments
python-six python3.4-six python-Babel python3.4-Babel python-alabaster
python3.4-alabaster python-sphinx-rtd-theme python3.4-sphinx-rtd-theme
python-snowballstemmer python3.4-snowballstemmer"
2014-09-24 07:21:26 +00:00
makedepends="${hostmakedepends}"
2015-04-01 11:24:00 +00:00
depends="
python-setuptools python-docutils python-Jinja2 python-Pygments python-six
python-Babel python-alabaster python-sphinx-rtd-theme python-snowballstemmer"
2014-09-05 18:29:49 +00:00
pycompile_module="sphinx"
short_desc="Python2 documentation generator"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="http://sphinx-doc.org/"
license="BSD"
2015-04-01 11:24:00 +00:00
distfiles="${PYPI_SITE}/S/Sphinx/Sphinx-${version}.tar.gz"
checksum=1a6e5130c2b42d2de301693c299f78cc4bd3501e78b610c08e45efc70e2b5114
2014-09-05 18:29:49 +00:00
pre_build() {
2015-04-01 11:24:00 +00:00
cp -a ${wrksrc} /tmp/sphinx-2.7
cp -a ${wrksrc} /tmp/sphinx-3.4
mv /tmp/sphinx-{2.7,3.4} ${wrksrc}
cd sphinx-3.4
2014-09-05 18:29:49 +00:00
sed -i 's|\(sphinx-.*\) =|\13 =|' setup.py
sed -ri "s,'(sphinx-(:?|all|apidoc|build|quickstart))','\13'," doc/conf.py
sed -i 's,#! /usr/bin/env python,&3.4,' sphinx/pycode/pgen2/token.py
}
do_build() {
2015-04-01 11:24:00 +00:00
for pyver in $python_versions; do
cd ${wrksrc}/sphinx-${pyver}
python${pyver} setup.py build
python${pyver} sphinx-build.py -b man doc build/man
done
2014-09-05 18:29:49 +00:00
}
do_install() {
vmkdir usr/share/man/man1
2015-04-01 11:24:00 +00:00
for pyver in $python_versions; do
cd ${wrksrc}/sphinx-${pyver}
python${pyver} setup.py install --root=${DESTDIR}
vcopy ${wrksrc}/sphinx-${pyver}/build/man/*.1 usr/share/man/man1
done
vlicense LICENSE
2014-09-05 18:29:49 +00:00
}
python3.4-Sphinx_package() {
noarch=yes
2015-04-01 11:24:00 +00:00
depends="
python3.4-setuptools python3.4-docutils python3.4-Jinja2 python3.4-Pygments
python3.4-six python3.4-Babel python3.4-alabaster python3.4-sphinx-rtd-theme
python3.4-snowballstemmer"
2014-09-05 18:29:49 +00:00
pycompile_version="3.4"
pycompile_module="sphinx"
short_desc="${short_desc/Python2/Python3.4}"
pkg_install() {
vmove usr/bin/sphinx-*3
vmove usr/lib/python3.4
vmove usr/share/man/man1/sphinx-*3.1
2015-04-01 11:24:00 +00:00
vlicense LICENSE
2014-09-05 18:29:49 +00:00
}
}