From 8df984b8faf7d5f224f27613a2144991490609bd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 29 May 2024 22:20:29 -0700 Subject: [PATCH] build/pkgs/sagemath_doc_*: Install links into SAGE_DOCS in postinst --- .github/workflows/doc-build.yml | 2 +- build/pkgs/sagemath_doc_html/spkg-postinst.in | 7 +++++++ build/pkgs/sagemath_doc_pdf/spkg-postinst.in | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 build/pkgs/sagemath_doc_html/spkg-postinst.in create mode 120000 build/pkgs/sagemath_doc_pdf/spkg-postinst.in diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index dc07ba7511d..1a6f0acf024 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -199,7 +199,7 @@ jobs: export SAGE_LIVE_DOC=yes export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev ./config.status && make SAGE_WHEELS=yes SAGE_EDITABLE=no sagemath_doc_html-no-deps sagemath_doc_pdf-no-deps - (cd local/var/lib/sage/ && zip /sage/sagemath_doc_wheels.zip wheels/sagemath_doc*.whl) + (cd venv/var/lib/sage/ && zip /sage/sagemath_doc_wheels.zip wheels/sagemath_doc*.whl) shell: sh .ci/docker-exec-script.sh BUILD /sage {0} - name: Copy live doc diff --git a/build/pkgs/sagemath_doc_html/spkg-postinst.in b/build/pkgs/sagemath_doc_html/spkg-postinst.in new file mode 100644 index 00000000000..6af97b2de3e --- /dev/null +++ b/build/pkgs/sagemath_doc_html/spkg-postinst.in @@ -0,0 +1,7 @@ +mkdir -p "${SAGE_DOC}" +cd "${SAGE_INST_LOCAL}/share/doc/sage" +for a in *; do + if [ -e "$a" -a ! -e "${SAGE_DOC}/$a" ]; then + ln -sf "${SAGE_INST_LOCAL}/share/doc/sage/$a" "${SAGE_DOC}/$a" + fi +done diff --git a/build/pkgs/sagemath_doc_pdf/spkg-postinst.in b/build/pkgs/sagemath_doc_pdf/spkg-postinst.in new file mode 120000 index 00000000000..21f3c5c19c1 --- /dev/null +++ b/build/pkgs/sagemath_doc_pdf/spkg-postinst.in @@ -0,0 +1 @@ +../sagemath_doc_html/spkg-postinst.in \ No newline at end of file