[arch-commits] Commit in sagemath-doc/repos (2 files)

Antonio Rojas arojas at gemini.archlinux.org
Mon Aug 30 19:45:49 UTC 2021


    Date: Monday, August 30, 2021 @ 19:45:48
  Author: arojas
Revision: 1010068

archrelease: copy trunk to community-testing-any

Added:
  sagemath-doc/repos/community-testing-any/
  sagemath-doc/repos/community-testing-any/PKGBUILD
    (from rev 1010067, sagemath-doc/trunk/PKGBUILD)

----------+
 PKGBUILD |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Copied: sagemath-doc/repos/community-testing-any/PKGBUILD (from rev 1010067, sagemath-doc/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2021-08-30 19:45:48 UTC (rev 1010068)
@@ -0,0 +1,49 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgname=sagemath-doc
+pkgver=9.4
+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-ipywidgets thebe)
+source=(https://github.com/sagemath/sage/archive/$pkgver/sagemath-$pkgver.tar.gz)
+sha256sums=('47190f37e679c2483dadc13112595bacb399dfe4c4a0cde18d3627f5b2db0ea5')
+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 \
+         LANG=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