[arch-commits] Commit in sage-notebook/repos (3 files)

Antonio Rojas arojas at archlinux.org
Wed Sep 4 21:56:04 UTC 2019


    Date: Wednesday, September 4, 2019 @ 21:56:03
  Author: arojas
Revision: 508120

archrelease: copy trunk to community-staging-any

Added:
  sage-notebook/repos/community-staging-any/
  sage-notebook/repos/community-staging-any/PKGBUILD
    (from rev 508119, sage-notebook/trunk/PKGBUILD)
  sage-notebook/repos/community-staging-any/sage.service
    (from rev 508119, sage-notebook/trunk/sage.service)

--------------+
 PKGBUILD     |   65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sage.service |    8 +++++++
 2 files changed, 73 insertions(+)

Copied: sage-notebook/repos/community-staging-any/PKGBUILD (from rev 508119, sage-notebook/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2019-09-04 21:56:03 UTC (rev 508120)
@@ -0,0 +1,65 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Maintainer: Evgeniy Alekseev <arcanis.arch at gmail dot com>
+
+pkgname=sage-notebook
+pkgver=1.1.2
+pkgrel=2
+pkgdesc='Browser-based notebook interface for SageMath'
+arch=(any)
+url='http://www.sagemath.org'
+license=(GPL3)
+depends=(sagemath python2-twisted python2-flask-oldsessions python2-flask-openid python2-flask-autoindex python2-flask-babel mathjax2 jsmol)
+optdepends=('python2-pyopenssl: to use the notebook in secure mode')
+makedepends=(gendesk python2-sphinx)
+source=($pkgname-$pkgver::"https://github.com/sagemath/sagenb/archive/$pkgver.tar.gz" sage.service)
+sha256sums=('2c55438fb9a3ef88994ed385e2e9d88b11283853705fec11235a4f51a34aa04c'
+            '2cf8668fa77a96fe562dafd50cab41aad03f53ee8b91587b1b45ecd193c1517a')
+
+prepare() {
+# create *.desktop file
+  gendesk -f -n \
+          --pkgname="sage-notebook" \
+          --pkgdesc="SageMath notebook" \
+          --name="SageMath" \
+          --exec="/usr/bin/sage -notebook=sagenb" \
+          --terminal=true \
+          --categories="Education;Science;Math"
+
+  cd sagenb-$pkgver
+# Use python2
+  find -name '*.py' | xargs sed -e 's|#! /usr/bin/python|#! /usr/bin/python2|' -e 's|#!/usr/bin/python|#!/usr/bin/python2|' \
+    -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -i
+  sed -e 's|python %s|python2 %s|' -i sagenb/notebook/run_notebook.py
+  sed -e "s|python='python'|python='python2'|" -i sagenb/interfaces/expect.py 
+}
+
+build() {
+  cd sagenb-$pkgver
+  python2 setup.py build
+  
+  cd doc
+  make SPHINXBUILD=sphinx-build2 html
+}
+
+package() {
+  cd sagenb-$pkgver
+
+  python2 setup.py install --root "$pkgdir" --optimize=1
+
+  install -D -m644 COPYING "$pkgdir"/usr/share/licenses/${pkgname}/COPYING
+
+  ln -s /usr/share/mathjax2 "$pkgdir"/usr/lib/python2.7/site-packages/sagenb/data/mathjax
+
+# install a systemd user unit
+  install -Dm644 "${srcdir}/sage.service" "$pkgdir/usr/lib/systemd/user/sage.service"
+# install *.desktop and icon files
+  install -Dm644 "${srcdir}/sage-notebook.desktop" "$pkgdir/usr/share/applications/sage-notebook.desktop"
+  install -Dm644 "$pkgdir/usr/lib/python2.7/site-packages/sagenb/data/sage/images/icon48x48.png" \
+                 "$pkgdir/usr/share/pixmaps/sage-notebook.png"
+# remove sage3d
+  rm -r "$pkgdir"/usr/bin
+
+# install docs
+  mkdir -p "$pkgdir"/usr/share/doc/sagenb
+  cp -r doc/build/html "$pkgdir"/usr/share/doc/sagenb
+}

Copied: sage-notebook/repos/community-staging-any/sage.service (from rev 508119, sage-notebook/trunk/sage.service)
===================================================================
--- community-staging-any/sage.service	                        (rev 0)
+++ community-staging-any/sage.service	2019-09-04 21:56:03 UTC (rev 508120)
@@ -0,0 +1,8 @@
+[Unit]
+Description=A free open-source mathematics software system
+
+[Service]
+ExecStart=/usr/bin/sage -notebook=sagenb
+
+[Install]
+WantedBy=default.target


More information about the arch-commits mailing list