summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshwin Vishnu2016-11-02 12:41:48 +0100
committerAshwin Vishnu2016-11-02 12:41:48 +0100
commit8f6b91cb6ab50041acc36473912e2b0b2096a77e (patch)
tree9ff961cf41082eab7cfe6ea24ee4e6654b9dd90e
downloadaur-8f6b91cb6ab50041acc36473912e2b0b2096a77e.tar.gz
Initial commit
-rw-r--r--.SRCINFO25
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD62
-rw-r--r--devhelp-build.patch23
4 files changed, 115 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f78114bfc3bb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+# Generated by mksrcinfo v8
+# Wed Nov 2 11:37:55 UTC 2016
+pkgbase = python-numpy-docs-devhelp
+ pkgdesc = HTML documentation for Python NumPy with GNOME Devhelp support
+ pkgver = 1.11.2
+ pkgrel = 1
+ url = http://docs.scipy.org/
+ arch = any
+ license = GPL
+ makedepends = python
+ makedepends = python-sphinx
+ makedepends = python-numpydoc
+ makedepends = python-matplotlib
+ depends = devhelp
+ conflicts = python-numpy-doc
+ options = docs
+ source = numpy-1.11.2.tar.gz::https://github.com/numpy/numpy/archive/v1.11.2.tar.gz
+ source = git+https://github.com/scipy/scipy-sphinx-theme.git
+ source = devhelp-build.patch
+ md5sums = 90347ff0b20bd00f2547ef4950ab3523
+ md5sums = SKIP
+ md5sums = 79df7faef04116ce20dc0b0b876a837d
+
+pkgname = python-numpy-docs-devhelp
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..158488e23f87
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.bak
+*.tar.?z
+pkg/
+src/
+scipy-sphinx-theme/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2783e835a11b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Ashwin Vishnu <ashuwish+arch at protonmail dot com>
+
+pkgname='python-numpy-docs-devhelp'
+pkgver='1.11.2'
+pkgrel=1
+pkgdesc="HTML documentation for Python NumPy with GNOME Devhelp support"
+arch=('any')
+license=('GPL')
+url="http://docs.scipy.org/"
+depends=('devhelp')
+makedepends=('python' 'python-sphinx' 'python-numpydoc' 'python-matplotlib')
+conflicts=('python-numpy-doc')
+options=('docs')
+source=("numpy-$pkgver.tar.gz::https://github.com/numpy/numpy/archive/v$pkgver.tar.gz"
+ "git+https://github.com/scipy/scipy-sphinx-theme.git"
+ "devhelp-build.patch")
+md5sums=('90347ff0b20bd00f2547ef4950ab3523'
+ 'SKIP'
+ '79df7faef04116ce20dc0b0b876a837d')
+
+prepare() {
+ # Patch Sphinx Makefile
+ cd numpy-$pkgver
+ patch -p1 -i "${srcdir}/devhelp-build.patch"
+ sed -i 's/\"sidebar\":\ \"left\"/\"sidebar\":\ \"none\"/' "doc/source/conf.py"
+ rm -r doc/scipy-sphinx-theme
+ ln -s "${srcdir}/scipy-sphinx-theme" doc/scipy-sphinx-theme
+
+ # Patch CSS for Devhelp
+ cd "${srcdir}/scipy-sphinx-theme/_theme/scipy/static/css/"
+ sed -i 's/width:\ 80%/width:\ 100%/' spc-extend.css
+ sed -i 's/font-size:\ 12px/font-size:\ 75%/g' spc-extend.css
+ sed -i 's/font-size:\ 16.25px/font-size:\ 100%/g' spc-bootstrap.css
+ sed -i 's/font-size:\ 13px/font-size:\ 100%/g' spc-bootstrap.css
+ sed -i 's/font-size:\ 12px/font-size:\ 90%/g' spc-bootstrap.css
+ sed -i 's/font-size:\ 11px/font-size:\ 80%/g' spc-bootstrap.css
+ sed -i 's/line-height:\ 19px/line-height:\ 150%/' spc-bootstrap.css
+}
+
+build() {
+ cd "${srcdir}/numpy-${pkgver}/doc"
+ make devhelp \
+ PYTHON="python" \
+ SPHINXBUILD="sphinx-build"
+}
+
+package() {
+ local _pkgparent="python-numpy"
+
+ # Copy files
+ install -m 755 -d "${pkgdir}/usr/share/doc/${_pkgparent}/html"
+ cp -rf "${srcdir}/numpy-${pkgver}/doc/build/devhelp"/* \
+ "${pkgdir}/usr/share/doc/${_pkgparent}/html/"
+ find "${pkgdir}/usr/share/doc/${_pkgparent}/html/" -type f -exec chmod 0644 {} \;
+ find "${pkgdir}/usr/share/doc/${_pkgparent}/html/" -type d -exec chmod 0755 {} \;
+ mv "${pkgdir}/usr/share/doc/${_pkgparent}/html/NumPy.devhelp.gz" \
+ "${pkgdir}/usr/share/doc/${_pkgparent}/html/${_pkgparent}.devhelp.gz"
+
+ # Add Devhelp book
+ install -m 755 -d "${pkgdir}/usr/share/devhelp/books"
+ ln -s "/usr/share/doc/${_pkgparent}/html" "${pkgdir}/usr/share/devhelp/books/${_pkgparent}"
+}
diff --git a/devhelp-build.patch b/devhelp-build.patch
new file mode 100644
index 000000000000..069c2bc5e23f
--- /dev/null
+++ b/devhelp-build.patch
@@ -0,0 +1,23 @@
+--- numpy-1.11.2/doc/Makefile 2016-10-04 01:52:47.000000000 +0200
++++ numpy-1.11.2/doc/Makefile 2016-11-01 17:23:08.487117349 +0100
+@@ -27,6 +27,7 @@
+ @echo " html-scipyorg to make standalone HTML files with scipy.org theming"
+ @echo " pickle to make pickle files (usable by e.g. sphinx-web)"
+ @echo " htmlhelp to make HTML files and a HTML help project"
++ @echo " devhelp to make HTML files and a project for the Devhelp doc viewer"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " changes to make an overview over all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+@@ -147,6 +148,12 @@
+ %.chm: %.hhp
+ -hhc.exe $^
+
++devhelp: generate
++ mkdir -p build/devhelp build/doctrees
++ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) build/devhelp $(FILES)
++ @echo
++ @echo "Build finished. The HTML pages are in build/devhelp."
++
+ qthelp: generate
+ mkdir -p build/qthelp build/doctrees
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp $(FILES)