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

2016-03-25 Thread Antonio Rojas
Date: Saturday, March 26, 2016 @ 00:42:47
  Author: arojas
Revision: 168410

archrelease: copy trunk to community-staging-any

Added:
  sage-notebook/repos/community-staging-any/
  sage-notebook/repos/community-staging-any/PKGBUILD
(from rev 168409, sage-notebook/trunk/PKGBUILD)
  sage-notebook/repos/community-staging-any/jmol.patch
(from rev 168409, sage-notebook/trunk/jmol.patch)
  sage-notebook/repos/community-staging-any/sage-notebook.install
(from rev 168409, sage-notebook/trunk/sage-notebook.install)
  sage-notebook/repos/community-staging-any/sage.service
(from rev 168409, sage-notebook/trunk/sage.service)

---+
 PKGBUILD  |   70 
 jmol.patch|   21 ++
 sage-notebook.install |8 +
 sage.service  |8 +
 4 files changed, 107 insertions(+)

Copied: sage-notebook/repos/community-staging-any/PKGBUILD (from rev 168409, 
sage-notebook/trunk/PKGBUILD)
===
--- community-staging-any/PKGBUILD  (rev 0)
+++ community-staging-any/PKGBUILD  2016-03-25 23:42:47 UTC (rev 168410)
@@ -0,0 +1,70 @@
+# $Id$
+# Maintainer: Antonio Rojas 
+# Maintainer: Evgeniy Alekseev 
+
+pkgname=sage-notebook
+pkgver=0.11.7
+pkgrel=1
+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 
+python2-webassets mathjax)
+optdepends=('python2-pyopenssl: to use the notebook in secure mode')
+makedepends=(gendesk)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sagenb/archive/$pkgver.tar.gz;
 'sage.service' 'jmol.patch')
+install=$pkgname.install
+md5sums=('d25b1709da70a337d6149dddec192b9d'
+ '61620179a7ecd85401d8e5a6ece3ea41'
+ 'b29760c97a5328faa179a46008391bf0')
+
+prepare() {
+# create *.desktop file
+  gendesk -f -n \
+  --pkgname="sage-notebook" \
+  --pkgdesc="SageMath notebook" \
+  --name="SageMath" \
+  --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|' 
-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 
+
+# fix displaying 3D plots
+  patch -p0 -i "$srcdir"/jmol.patch
+}
+
+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
+
+# Use system mathjax
+  rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sagenb/data/mathjax
+  ln -s /usr/share/mathjax 
"$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"
+}

Copied: sage-notebook/repos/community-staging-any/jmol.patch (from rev 168409, 
sage-notebook/trunk/jmol.patch)
===
--- community-staging-any/jmol.patch(rev 0)
+++ community-staging-any/jmol.patch2016-03-25 23:42:47 UTC (rev 168410)
@@ -0,0 +1,21 @@
+--- sagenb/flask_version/base.py.orig  2015-01-06 19:30:34.326174783 +0100
 sagenb/flask_version/base.py   2015-01-06 19:31:08.439723240 +0100
+@@ -36,12 +36,12 @@
+ self.add_static_path('/javascript', DATA)
+ self.add_static_path('/static', DATA)
+ self.add_static_path('/java', DATA)
+-self.add_static_path('/java/jmol', 
os.path.join(os.environ["SAGE_ROOT"],"local","share","jmol"))
+-self.add_static_path('/jsmol', 
os.path.join(os.environ["SAGE_ROOT"],"local","share","jsmol"))
+-self.add_static_path('/jsmol/js', 
os.path.join(os.environ["SAGE_ROOT"],"local","share","jsmol","js"))
+-self.add_static_path('/j2s', 
os.path.join(os.environ["SAGE_ROOT"],"local","share","jsmol","j2s"))
+-self.add_static_path('/jsmol/j2s', 
os.path.join(os.environ["SAGE_ROOT"],"local","share","jsmol","j2s"))
+-self.add_static_path('/j2s/core', 

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

2016-01-19 Thread Antonio Rojas
Date: Tuesday, January 19, 2016 @ 18:33:07
  Author: arojas
Revision: 157709

archrelease: copy trunk to community-staging-any

Added:
  sage-notebook/repos/community-staging-any/
  sage-notebook/repos/community-staging-any/PKGBUILD
(from rev 157708, sage-notebook/trunk/PKGBUILD)
  sage-notebook/repos/community-staging-any/jmol.patch
(from rev 157708, sage-notebook/trunk/jmol.patch)
  sage-notebook/repos/community-staging-any/sage-notebook.install
(from rev 157708, sage-notebook/trunk/sage-notebook.install)
  sage-notebook/repos/community-staging-any/sage.service
(from rev 157708, sage-notebook/trunk/sage.service)

---+
 PKGBUILD  |   70 
 jmol.patch|   21 ++
 sage-notebook.install |8 +
 sage.service  |8 +
 4 files changed, 107 insertions(+)

Copied: sage-notebook/repos/community-staging-any/PKGBUILD (from rev 157708, 
sage-notebook/trunk/PKGBUILD)
===
--- community-staging-any/PKGBUILD  (rev 0)
+++ community-staging-any/PKGBUILD  2016-01-19 17:33:07 UTC (rev 157709)
@@ -0,0 +1,70 @@
+# $Id$
+# Maintainer: Antonio Rojas 
+# Maintainer: Evgeniy Alekseev 
+
+pkgname=sage-notebook
+pkgver=0.11.6.1
+pkgrel=1
+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 
+python2-webassets mathjax)
+optdepends=('python2-pyopenssl: to use the notebook in secure mode')
+makedepends=(gendesk)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sagenb/archive/$pkgver.tar.gz;
 'sage.service' 'jmol.patch')
+install=$pkgname.install
+md5sums=('9ccb67b5b5fb42702889ad5f37578eb3'
+ '61620179a7ecd85401d8e5a6ece3ea41'
+ 'b29760c97a5328faa179a46008391bf0')
+
+prepare() {
+# create *.desktop file
+  gendesk -f -n \
+  --pkgname="sage-notebook" \
+  --pkgdesc="SageMath notebook" \
+  --name="SageMath" \
+  --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|' 
-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 
+
+# fix displaying 3D plots
+  patch -p0 -i "$srcdir"/jmol.patch
+}
+
+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
+
+# Use system mathjax
+  rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sagenb/data/mathjax
+  ln -s /usr/share/mathjax 
"$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"
+}

Copied: sage-notebook/repos/community-staging-any/jmol.patch (from rev 157708, 
sage-notebook/trunk/jmol.patch)
===
--- community-staging-any/jmol.patch(rev 0)
+++ community-staging-any/jmol.patch2016-01-19 17:33:07 UTC (rev 157709)
@@ -0,0 +1,21 @@
+--- sagenb/flask_version/base.py.orig  2015-01-06 19:30:34.326174783 +0100
 sagenb/flask_version/base.py   2015-01-06 19:31:08.439723240 +0100
+@@ -36,12 +36,12 @@
+ self.add_static_path('/javascript', DATA)
+ self.add_static_path('/static', DATA)
+ self.add_static_path('/java', DATA)
+-self.add_static_path('/java/jmol', 
os.path.join(os.environ["SAGE_ROOT"],"local","share","jmol"))
+-self.add_static_path('/jsmol', 
os.path.join(os.environ["SAGE_ROOT"],"local","share","jsmol"))
+-self.add_static_path('/jsmol/js', 
os.path.join(os.environ["SAGE_ROOT"],"local","share","jsmol","js"))
+-self.add_static_path('/j2s', 
os.path.join(os.environ["SAGE_ROOT"],"local","share","jsmol","j2s"))
+-self.add_static_path('/jsmol/j2s', 
os.path.join(os.environ["SAGE_ROOT"],"local","share","jsmol","j2s"))
+-

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

2015-02-17 Thread Antonio Rojas
Date: Tuesday, February 17, 2015 @ 20:41:21
  Author: arojas
Revision: 127869

archrelease: copy trunk to community-testing-any

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

---+
 PKGBUILD  |   65 
 jmol.patch|   21 +++
 sage-notebook.install |8 +
 sage.service  |8 +
 4 files changed, 102 insertions(+)

Copied: sage-notebook/repos/community-testing-any/PKGBUILD (from rev 127868, 
sage-notebook/trunk/PKGBUILD)
===
--- community-testing-any/PKGBUILD  (rev 0)
+++ community-testing-any/PKGBUILD  2015-02-17 19:41:21 UTC (rev 127869)
@@ -0,0 +1,65 @@
+# $Id$
+# Maintainer: Antonio Rojas aro...@archlinux.org
+# Maintainer: Evgeniy Alekseev arcanis.arch at gmail dot com
+
+pkgname=sage-notebook
+pkgver=0.11.4
+pkgrel=1
+pkgdesc='Browser-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' 'jmol.patch')
+install=$pkgname.install
+md5sums=('e8e0495d3668735c4ec2abc157c17f6b'
+ '61620179a7ecd85401d8e5a6ece3ea41'
+ 'b29760c97a5328faa179a46008391bf0')
+
+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|' 
-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 
+
+# fix displaying 3D plots
+  patch -p0 -i $srcdir/jmol.patch
+}
+
+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/jmol.patch (from rev 127868, 
sage-notebook/trunk/jmol.patch)
===
--- community-testing-any/jmol.patch(rev 0)
+++ community-testing-any/jmol.patch2015-02-17 19:41:21 UTC (rev 127869)
@@ -0,0 +1,21 @@
+--- sagenb/flask_version/base.py.orig  2015-01-06 19:30:34.326174783 +0100
 sagenb/flask_version/base.py   2015-01-06 19:31:08.439723240 +0100
+@@ -36,12 +36,12 @@
+ self.add_static_path('/javascript', DATA)
+ self.add_static_path('/static', DATA)
+ self.add_static_path('/java', DATA)
+-self.add_static_path('/java/jmol', 
os.path.join(os.environ[SAGE_ROOT],local,share,jmol))
+-self.add_static_path('/jsmol', 
os.path.join(os.environ[SAGE_ROOT],local,share,jsmol))
+-self.add_static_path('/jsmol/js', 
os.path.join(os.environ[SAGE_ROOT],local,share,jsmol,js))
+-self.add_static_path('/j2s', 
os.path.join(os.environ[SAGE_ROOT],local,share,jsmol,j2s))
+-self.add_static_path('/jsmol/j2s', 
os.path.join(os.environ[SAGE_ROOT],local,share,jsmol,j2s))
+-self.add_static_path('/j2s/core', 
os.path.join(os.environ[SAGE_ROOT],local,share,jsmol,j2s,core))
++self.add_static_path('/java/jmol', 
os.path.join(os.environ[SAGE_ROOT],share,jmol))
++self.add_static_path('/jsmol', 

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

2015-01-06 Thread Antonio Rojas
Date: Tuesday, January 6, 2015 @ 19:53:16
  Author: arojas
Revision: 125536

archrelease: copy trunk to community-any

Added:
  sage-notebook/repos/community-any/
  sage-notebook/repos/community-any/PKGBUILD
(from rev 125535, sage-notebook/trunk/PKGBUILD)
  sage-notebook/repos/community-any/jmol.patch
(from rev 125535, sage-notebook/trunk/jmol.patch)
  sage-notebook/repos/community-any/sage-notebook.install
(from rev 125535, sage-notebook/trunk/sage-notebook.install)
  sage-notebook/repos/community-any/sage.service
(from rev 125535, sage-notebook/trunk/sage.service)

---+
 PKGBUILD  |   64 
 jmol.patch|   21 +++
 sage-notebook.install |   17 
 sage.service  |8 ++
 4 files changed, 110 insertions(+)

Copied: sage-notebook/repos/community-any/PKGBUILD (from rev 125535, 
sage-notebook/trunk/PKGBUILD)
===
--- community-any/PKGBUILD  (rev 0)
+++ community-any/PKGBUILD  2015-01-06 18:53:16 UTC (rev 125536)
@@ -0,0 +1,64 @@
+# Maintainer: Antonio Rojas aro...@archlinux.org
+# Maintainer: Evgeniy Alekseev arcanis.arch at gmail dot com
+
+pkgname=sage-notebook
+pkgver=0.11.1
+pkgrel=2
+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' 'jmol.patch')
+install=$pkgname.install
+md5sums=('74d9ddd0f1b77ff8ef9d0f5b0007cf00'
+ '61620179a7ecd85401d8e5a6ece3ea41'
+ 'b29760c97a5328faa179a46008391bf0')
+
+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|' 
-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 
+
+# fix displaying 3D plots
+  patch -p0 -i $srcdir/jmol.patch
+}
+
+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-any/jmol.patch (from rev 125535, 
sage-notebook/trunk/jmol.patch)
===
--- community-any/jmol.patch(rev 0)
+++ community-any/jmol.patch2015-01-06 18:53:16 UTC (rev 125536)
@@ -0,0 +1,21 @@
+--- sagenb/flask_version/base.py.orig  2015-01-06 19:30:34.326174783 +0100
 sagenb/flask_version/base.py   2015-01-06 19:31:08.439723240 +0100
+@@ -36,12 +36,12 @@
+ self.add_static_path('/javascript', DATA)
+ self.add_static_path('/static', DATA)
+ self.add_static_path('/java', DATA)
+-self.add_static_path('/java/jmol', 
os.path.join(os.environ[SAGE_ROOT],local,share,jmol))
+-self.add_static_path('/jsmol', 
os.path.join(os.environ[SAGE_ROOT],local,share,jsmol))
+-self.add_static_path('/jsmol/js', 
os.path.join(os.environ[SAGE_ROOT],local,share,jsmol,js))
+-self.add_static_path('/j2s', 
os.path.join(os.environ[SAGE_ROOT],local,share,jsmol,j2s))
+-self.add_static_path('/jsmol/j2s', 
os.path.join(os.environ[SAGE_ROOT],local,share,jsmol,j2s))
+-self.add_static_path('/j2s/core', 
os.path.join(os.environ[SAGE_ROOT],local,share,jsmol,j2s,core))
++self.add_static_path('/java/jmol', 
os.path.join(os.environ[SAGE_ROOT],share,jmol))
++self.add_static_path('/jsmol', 
os.path.join(os.environ[SAGE_ROOT],share,jsmol))
++self.add_static_path('/jsmol/js', 

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

2015-01-05 Thread Antonio Rojas
Date: Monday, January 5, 2015 @ 22:14:11
  Author: arojas
Revision: 125452

db-move: moved sage-notebook from [community-testing] to [community] (any)

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

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

Copied: sage-notebook/repos/community-any/PKGBUILD (from rev 125451, 
sage-notebook/repos/community-testing-any/PKGBUILD)
===
--- community-any/PKGBUILD  (rev 0)
+++ community-any/PKGBUILD  2015-01-05 21:14:11 UTC (rev 125452)
@@ -0,0 +1,60 @@
+# Maintainer: Antonio Rojas aro...@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|' 
-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
+}
+
+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-any/sage-notebook.install (from rev 
125451, sage-notebook/repos/community-testing-any/sage-notebook.install)
===
--- community-any/sage-notebook.install (rev 0)
+++ community-any/sage-notebook.install 2015-01-05 21:14:11 UTC (rev 125452)
@@ -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-any/sage.service (from rev 125451, 
sage-notebook/repos/community-testing-any/sage.service)
===
--- community-any/sage.service  (rev 0)
+++ community-any/sage.service  2015-01-05 21:14:11 UTC (rev 125452)
@@ -0,0 +1,8 @@
+[Unit]
+Description=A free open-source mathematics software system
+
+[Service]
+ExecStart=/usr/bin/sage -n
+
+[Install]
+WantedBy=default.target