diff options
author | Jonathon Fernyhough | 2018-09-02 21:25:48 +0100 |
---|---|---|
committer | Jonathon Fernyhough | 2018-09-02 21:25:48 +0100 |
commit | ea0d0fdbecbdfb0c6bac61ddf69ccf68ea9f5a76 (patch) | |
tree | a2ae929e5869e690ea3c8bf8c0ff7521396b9e11 | |
parent | 4120ab5bf8a69b160b49e29782cb29eef0ed450d (diff) | |
download | aur-ea0d0fdbecbdfb0c6bac61ddf69ccf68ea9f5a76.tar.gz |
Generate files using build.jl instead of cat'ing
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 60 |
2 files changed, 32 insertions, 35 deletions
@@ -1,10 +1,11 @@ pkgbase = julia-ijulia - pkgdesc = Julia-language backend combined with the Jupyter interactive environmen + pkgdesc = Julia-language backend combined with the Jupyter interactive environment pkgver = 1.10.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/JuliaLang/IJulia.jl arch = any - license = custom + license = MIT + makedepends = julia-conda depends = julia depends = julia-compat depends = julia-json @@ -3,11 +3,11 @@ pkgname=julia-ijulia _pkgname=IJulia pkgver=1.10.0 -pkgrel=1 +pkgrel=2 pkgdesc='Julia-language backend combined with the Jupyter interactive environment' arch=(any) url=https://github.com/JuliaLang/IJulia.jl -license=(custom) +license=(MIT) depends=(julia julia-compat julia-json @@ -16,47 +16,43 @@ depends=(julia julia-zmq jupyter ) +makedepends=( + julia-conda +) source=($pkgname-$pkgver.tar.gz::https://github.com/JuliaLang/$_pkgname.jl/archive/v$pkgver.tar.gz) sha256sums=('2768d2a98c8522b252dac9651863cb06eae48c1509fc9c75d490a1c2c9452f81') prepare() { - cd $_pkgname.jl-$pkgver - cat >deps/deps.jl <<'EOF' -const jupyter = "/usr/bin/jupyter" -const notebook_cmd = ["/usr/bin/jupyter", "notebook", "--NotebookApp.iopub_data_rate_limit=2147483647"] -const jupyter_vers = v"4.4.0" -const IJULIA_DEBUG = false -EOF - - cat >deps/kernel.json <<'EOF' -{ - "display_name": "Julia 1.0.0", - "argv": [ - "/bin/julia", - "-i", - "--startup-file=yes", - "--color=yes", - "/usr/share/julia/environments/v1.0/IJulia/src/kernel.jl", - "{connection_file}" - ], - "language": "julia" -} -EOF -} + cd $_pkgname.jl-$pkgver/deps -package() { - cd $_pkgname.jl-$pkgver - install -dm755 $pkgdir/usr/share/julia/environments/v1.0/$_pkgname - cp -r {src,test,deps} $pkgdir/usr/share/julia/environments/v1.0/$_pkgname/ + # Hard-code check for conda to fail. We want it to fail so we use the system jupyter. + sed -i '/isconda =/c\isconda = false' build.jl + + # Don't install kernel spec to building user's home + sed -i "75,79s|--user|--prefix=.|" kspec.jl +} - install -dm755 $pkgdir/usr/share/jupyter/kernels/ijulia - install deps/{kernel.json,logo*} $pkgdir/usr/share/jupyter/kernels/ijulia/ +build() { + cd $_pkgname.jl-$pkgver/deps + julia build.jl - install -Dm644 LICENSE.md $pkgdir/usr/share/licenses/$pkgname/LICENSE + # Fix reference to $srcdir + sed -i "s|$srcdir/$_pkgname.jl-$pkgver|/usr/share/julia/environments/v1.0/$_pkgname|" \ + share/jupyter/kernels/julia-1.0/kernel.json } check() { cd $_pkgname.jl-$pkgver JULIA_LOAD_PATH=src:$JULIA_LOAD_PATH julia test/runtests.jl } + +package() { + cd $_pkgname.jl-$pkgver + + install -dm755 "$pkgdir"/usr/ + mv deps/share "$pkgdir"/usr/ + + install -dm755 "$pkgdir"/usr/share/julia/environments/v1.0/$_pkgname/ + cp -r {src,test,deps} "$pkgdir"/usr/share/julia/environments/v1.0/$_pkgname/ +} |