[arch-commits] Commit in sage-notebook (5 files)

Antonio Rojas arojas at archlinux.org
Tue Dec 23 23:15:29 UTC 2014


    Date: Wednesday, December 24, 2014 @ 00:15:28
  Author: arojas
Revision: 124488

archrelease: copy trunk to community-testing-any

Added:
  sage-notebook/repos/
  sage-notebook/repos/community-testing-any/
  sage-notebook/repos/community-testing-any/PKGBUILD
    (from rev 124487, sage-notebook/trunk/PKGBUILD)
  sage-notebook/repos/community-testing-any/sage-notebook.install
    (from rev 124487, sage-notebook/trunk/sage-notebook.install)
  sage-notebook/repos/community-testing-any/sage.service
    (from rev 124487, sage-notebook/trunk/sage.service)

-----------------------+
 PKGBUILD              |   59 ++++++++++++++++++++++++++++++++++++++++++++++++
 sage-notebook.install |   17 +++++++++++++
 sage.service          |    8 ++++++
 3 files changed, 84 insertions(+)

Copied: sage-notebook/repos/community-testing-any/PKGBUILD (from rev 124487, sage-notebook/trunk/PKGBUILD)
===================================================================
--- repos/community-testing-any/PKGBUILD	                        (rev 0)
+++ repos/community-testing-any/PKGBUILD	2014-12-23 23:15:28 UTC (rev 124488)
@@ -0,0 +1,59 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Maintainer: Evgeniy Alekseev <arcanis.arch at gmail dot com>
+
+pkgname=sage-notebook
+pkgver=0.11.1
+pkgrel=1
+pkgdesc='Web-based notebook interface for Sage'
+arch=('any')
+url='http://www.sagemath.org'
+license=('GPL3')
+depends=('sage-mathematics' 'python2-twisted' 'python2-flask-oldsessions' 'python2-flask-openid' 'python2-flask-autoindex' 'python2-flask-babel' 'python2-flask-silk' 'python2-webassets')
+optdepends=('python2-pyopenssl: to use the notebook in secure mode')
+makedepends=('gendesk')
+source=("https://github.com/sagemath/sagenb/archive/$pkgver.tar.gz" 'sage.service')
+install=$pkgname.install
+md5sums=('74d9ddd0f1b77ff8ef9d0f5b0007cf00'
+         '61620179a7ecd85401d8e5a6ece3ea41')
+
+prepare() {
+# create *.desktop file
+  gendesk -f -n \
+          --pkgname="sage-notebook" \
+          --pkgdesc="Sage notebook" \
+          --name="Sage" \
+          --exec="/usr/bin/sage -notebook" \
+          --terminal=true \
+          --categories="Education;Science;Math" \
+          --custom="X-DCOP-ServiceType=
+X-KDE-SubstituteUID=false
+X-KDE-Username="
+
+  cd sagenb-$pkgver
+  
+# Use python2
+  find -name *.py | xargs sed -e 's|#! /usr/bin/python|#! /usr/bin/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
+}
+
+package() {
+  cd sagenb-${pkgver}
+
+  python2 setup.py install --root "$pkgdir" --optimize=1
+
+  install -D -m644 COPYING "$pkgdir"/usr/share/licenses/${pkgname}/COPYING
+
+# 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"
+}

Copied: sage-notebook/repos/community-testing-any/sage-notebook.install (from rev 124487, sage-notebook/trunk/sage-notebook.install)
===================================================================
--- repos/community-testing-any/sage-notebook.install	                        (rev 0)
+++ repos/community-testing-any/sage-notebook.install	2014-12-23 23:15:28 UTC (rev 124488)
@@ -0,0 +1,17 @@
+post_install() {
+  update-desktop-database -q
+
+  # add sagemath user for the daemon
+  useradd -r -c 'Sage daemon' -d /var/lib/sage -s /bin/false sagemath
+}
+
+post_upgrade() {
+  post_install $1
+  echo "There is now a user session unit included to run a sage notebook as your user."
+  echo "The wiki includes a guide on starting systemd user sessions"
+}
+
+post_remove() {
+  # remove the sagemath daemon user
+  userdel sagemath
+}

Copied: sage-notebook/repos/community-testing-any/sage.service (from rev 124487, sage-notebook/trunk/sage.service)
===================================================================
--- repos/community-testing-any/sage.service	                        (rev 0)
+++ repos/community-testing-any/sage.service	2014-12-23 23:15:28 UTC (rev 124488)
@@ -0,0 +1,8 @@
+[Unit]
+Description=A free open-source mathematics software system
+
+[Service]
+ExecStart=/usr/bin/sage -n
+
+[Install]
+WantedBy=default.target



More information about the arch-commits mailing list