-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppImage.yml
70 lines (68 loc) · 2.73 KB
/
AppImage.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
app: applause
ingredients:
packages:
# The binary links against these:
- libreadline
# libjack must be used from the host system...
#- libjack-jackd2
#- libluajit-5.1
# Required only at runtime.
# Development packages are not strictly required, but they provide the plain *.so symlinks
# that LuaJIT FFI expects:
- libsndfile1-dev
- libasound2-dev
- feedgnuplot
# FIXME: No matter what, we cannot get rid of gnuplot-qt, pulled in by feedgnuplot...
#- gnuplot-x11
# FIXME: Why is this required in the image?
- python3-venv
dist: focal
sources:
- deb http://archive.ubuntu.com/ubuntu/ focal main universe
script:
# NOTE: The LuaJIT from Ubuntu is too outdated.
- wget -O luajit.tar.gz -c "https://github.com/LuaJIT/LuaJIT/archive/refs/heads/v2.1.tar.gz"
# Will leave a "LuaJIT-2.1" directory.
- tar xzf luajit.tar.gz
- wget -O applause.tar.gz -c "https://github.com/rhaberkorn/applause2/archive/refs/heads/master.tar.gz"
# Will leave an "applause2-master" directory.
- tar xzf applause.tar.gz
# Install build-time dependencies
- sudo apt-get install -y build-essential lua5.1 libreadline-dev libjack-jackd2-dev virtualenv
script:
- make -C ../LuaJIT-2.1 DESTDIR=`pwd` PREFIX=/usr install
- make -C ../applause2-master LUA_CFLAGS="-I`pwd`/usr/include/luajit-2.1" LUA_LDFLAGS="-L`pwd`/usr/lib -lluajit-5.1"
- cp -r ../applause2-master ./usr/share/applause
# Will be required by the ILua fork
- ln -s ../share/applause/ilua-wrapper.sh ./usr/bin/lua
# Install Jupyter notebooks...
- virtualenv --python=python3 ./usr
- ./usr/bin/pip3 install --no-input notebook twisted==22.10.0 git+https://github.com/rhaberkorn/ilua.git@improvements
# This custom launcher starts the notebook by default but allows launching the plain CLI as well.
# NOTE: The Pip-installed hash-bang lines hard code paths from the build system.
- cat >./usr/bin/applause <<\EOF
- #!/bin/sh
- HERE="$(dirname "$(readlink -f "$0")")"
- APPDIR=$(readlink -f "$HERE/../../")
- export PYTHONPATH="$APPDIR/usr/lib/python3.8/site-packages"
- cd ~/
- if [ "$1" = cli ]; then shift; exec lua "$@"; fi
- if [ "$1" = ilua ]; then shift; exec python3 "$APPDIR/usr/bin/ilua" "$@"; fi
- exec python3 "$APPDIR/usr/bin/jupyter-notebook" --MultiKernelManager.default_kernel_name=lua "$@"
- EOF
- chmod a+x ./usr/bin/applause
# Some thinning - remove unneeded files
- find . -name "*.a" -delete
- rm -rf ./usr/share/doc
# - cp ../applause2-master/applause.desktop .
- cat >applause.desktop <<EOF
- [Desktop Entry]
- Type=Application
- Categories=Audio
- Icon=applause
- Name=Applause
- Exec=applause %u
- Terminal=true
- EOF
# FIXME: Add a real icon.
- touch applause.svg