[arch-commits] Commit in sagemath-doc/repos (2 files)
Antonio Rojas
arojas at gemini.archlinux.org
Mon May 16 07:10:02 UTC 2022
Date: Monday, May 16, 2022 @ 07:10:01
Author: arojas
Revision: 1207522
archrelease: copy trunk to community-testing-any
Added:
sagemath-doc/repos/community-testing-any/
sagemath-doc/repos/community-testing-any/PKGBUILD
(from rev 1207521, sagemath-doc/trunk/PKGBUILD)
----------+
PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
Copied: sagemath-doc/repos/community-testing-any/PKGBUILD (from rev 1207521, sagemath-doc/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2022-05-16 07:10:01 UTC (rev 1207522)
@@ -0,0 +1,49 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgname=sagemath-doc
+pkgver=9.6
+pkgrel=1
+pkgdesc='HTML documentation for SageMath'
+arch=(any)
+url='http://www.sagemath.org'
+license=(GPL)
+depends=(gap-doc python-pplpy)
+makedepends=(sagemath python-pyzmq python-docutils python-jupyter_client python-pkgconfig cython python-jupyter-sphinx)
+source=(https://github.com/sagemath/sage/archive/$pkgver/sagemath-$pkgver.tar.gz)
+sha256sums=('c6225d48f70ac955fceed5c1fddfdd7294001d460b43a686329d5d44d836f6a3')
+options=(!strip) # nothing to strip, save packaging time
+
+prepare() {
+ cd sage-$pkgver
+
+ SAGE_ROOT="$PWD" PATH="$PWD/build/bin:$PATH" src/doc/bootstrap
+ rm -r src/sage # Use the installed sage, not the one from the source tree
+}
+
+build() {
+ cd sage-$pkgver/src
+
+ export SAGE_SRC="$PWD" \
+ SAGE_DOC="$PWD"/doc \
+ MATHJAX_DIR=/usr/share/mathjax2 \
+ SAGE_NUM_THREADS=10 \
+ LANGUAGE=C
+ python -m sage_docbuild --no-pdf-links --mathjax all html
+}
+
+package() {
+ cd sage-$pkgver/src/doc
+
+ mkdir -p "$pkgdir"/usr/share/doc/sage
+ cp -r common "$pkgdir"/usr/share/doc/sage
+ cp -r html "$pkgdir"/usr/share/doc/sage
+
+# Replace duplicated files by symlinks (Gentoo)
+ cd "$pkgdir"/usr/share/doc/sage
+ mv html/en/_static{,.tmp}
+ for _dir in `find -name _static` ; do
+ rm -r $_dir
+ ln -s /usr/share/doc/sage/html/en/_static $_dir
+ done
+ mv html/en/_static{.tmp,}
+}
More information about the arch-commits
mailing list