summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 229f65751973292dfdde282a1bf0b7720a9e4053 (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
# Maintainer: Tarn Burton <twburton at gmail dot com>
pkgname=maxima-jupyter-git
pkgver=r175.b121c57
pkgrel=1
pkgdesc="A Maxima kernel for Jupyter, based on CL-Jupyter (Common Lisp kernel)"
arch=("x86_64")
url="https://github.com/robert-dodier/maxima-jupyter"
license=('BSD')
depends=("maxima")
conflicts=('maxima-ecl')
options=('!strip')
source=(
  "$pkgname::git+https://github.com/robert-dodier/maxima-jupyter"
  'https://beta.quicklisp.org/quicklisp.lisp'
  'kernel.json')
sha256sums=('SKIP'
            '4a7a5c2aebe0716417047854267397e24a44d0cce096127411e9ce9ccfeb2c17'
            'a637eae8a7c50e0253c1ec29c26e3eda23b15b68cdf893bde67cf67cd658f2f1')

pkgver() {
  cd $pkgname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  rm -rf quicklisp bin
  mkdir -p quicklisp bin
  maxima <<END
:lisp (load "quicklisp.lisp")
:lisp (quicklisp-quickstart:install :path "quicklisp")
:lisp (ql:quickload "cffi")
:lisp (ql:quickload "trivial-dump-core")
:lisp (load "maxima-jupyter-git/load-maxima-jupyter.lisp")
:lisp (trivial-dump-core:save-executable "bin/maxima-jupyter" #'cl-jupyter:kernel-start)
quit();
END
}

package() {
  install -Dm755 bin/maxima-jupyter "$pkgdir/usr/bin/maxima-jupyter"
  install -Dm644 kernel.json "$pkgdir/usr/share/jupyter/kernels/maxima/kernel.json"
  install -Dm644 maxima-jupyter-git/LICENSE "$pkgdir/usr/share/licenses/maxima-jupyter-git/LICENSE"
}