summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1b063431f22e468bf374dfc4a9502c82d3a6e98e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: Brenton Horne <brentonhorne77 at gmail dot com>

pkgname=jupyterlab-git
pkgver=3.0.0.r0.g63c5989cdd
pkgrel=1
epoch=1
pkgdesc="JupyterLab computational environment"
arch=(any)
url="https://github.com/jupyterlab/jupyterlab"
license=(custom)
makedepends=(python-setuptools nodejs python-recommonmark jsx-lexer python-sphinx_rtd_theme python-sphinx-copybutton)
depends=(jupyterlab_server)
source=("git+https://github.com/jupyterlab/jupyterlab.git"
jupyter-lab.desktop)
sha256sums=('SKIP'
            'd7ed2287b823a78b7fe05194180ad9b4602657d5e32b8ed548418039451c0434')

pkgver() {
    cd $srcdir/jupyterlab
    git describe --match "v*" --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd $srcdir/jupyterlab
  sed -e 's|~=|>=|' -i setup.py
}

build() {
  cd $srcdir/jupyterlab
  python setup.py build 
  cd docs
  make html
}

package() {
  cd $srcdir/jupyterlab
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE

  install -d "$pkgdir"/usr/share/{pixmaps,doc/${pkgname}}
  install -Dm644 examples/notebook/jupyter.png "$pkgdir"/usr/share/pixmaps/jupyter.png
  install -Dm755 $srcdir/jupyter-lab.desktop "$pkgdir"/usr/share/applications/jupyter-lab.desktop
  cp -r docs/build/html/* ${pkgdir}/usr/share/doc/${pkgname}
}