From ecc83abb86cbb8d4b552951c7c0a3b89594201bb Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Fri, 5 Sep 2014 20:29:49 +0200 Subject: [PATCH] New package: python-Sphinx-1.2.3 --- srcpkgs/python-Sphinx/template | 69 ++++++++++++++++++++++++++++++++++ srcpkgs/python3.4-Sphinx | 1 + 2 files changed, 70 insertions(+) create mode 100644 srcpkgs/python-Sphinx/template create mode 120000 srcpkgs/python3.4-Sphinx diff --git a/srcpkgs/python-Sphinx/template b/srcpkgs/python-Sphinx/template new file mode 100644 index 00000000000..cb0ac7bd3fe --- /dev/null +++ b/srcpkgs/python-Sphinx/template @@ -0,0 +1,69 @@ +# Template file for 'python-Sphinx' +pkgname=python-Sphinx +version=1.2.3 +revision=1 +noarch=yes +wrksrc="Sphinx-${version}" +python_versions="2.7 3.4" +hostmakedepends="python-setuptools python3.4-setuptools" +makedepends=" + python-docutils python3.4-docutils python-Jinja2 python3.4-Jinja2 + python-Pygments python3.4-Pygments" +depends="python python-docutils python-Jinja2 python-Pygments" +pycompile_module="sphinx" +short_desc="Python2 documentation generator" +maintainer="Alessio Sergi " +homepage="http://sphinx-doc.org/" +license="BSD" +distfiles="https://pypi.python.org/packages/source/S/Sphinx/Sphinx-${version}.tar.gz" +checksum=94933b64e2fe0807da0612c574a021c0dac28c7bd3c4a23723ae5a39ea8f3d04 + +post_extract() { + cp -a ${wrksrc} /tmp/python2.7-build + cp -a ${wrksrc} /tmp/python3.4-build + mv /tmp/python{2.7,3.4}-build ${wrksrc} +} + +pre_build() { + cd ${wrksrc}/python3.4-build + 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() { + cd ${wrksrc}/python2.7-build + python setup.py build + python sphinx-build.py -b man doc build/man + + cd ${wrksrc}/python3.4-build + python3.4 setup.py build + python sphinx-build.py -b man doc build/man +} + +do_install() { + cd ${wrksrc}/python2.7-build + python setup.py install --root=${DESTDIR} + + cd ${wrksrc}/python3.4-build + python3.4 setup.py install --root=${DESTDIR} +} + +post_install() { + vmkdir usr/share/man/man1 + vcopy ${wrksrc}/python2.7-build/build/man/*.1 usr/share/man/man1 + vcopy ${wrksrc}/python3.4-build/build/man/*.1 usr/share/man/man1 +} + +python3.4-Sphinx_package() { + noarch=yes + depends="python3.4 python3.4-docutils python3.4-Jinja2 python3.4-Pygments" + 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 + } +} diff --git a/srcpkgs/python3.4-Sphinx b/srcpkgs/python3.4-Sphinx new file mode 120000 index 00000000000..2ebd263145b --- /dev/null +++ b/srcpkgs/python3.4-Sphinx @@ -0,0 +1 @@ +python-Sphinx \ No newline at end of file