-
Notifications
You must be signed in to change notification settings - Fork 2
/
snapcraft.yaml
98 lines (90 loc) · 2.65 KB
/
snapcraft.yaml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: anki-ppd
base: core22
version: "2.1.54"
summary: Extensible flashcard learning program.
description: |
Anki is a program which makes remembering things easy. Because it's a lot
more efficient than traditional study methods, you can either greatly
decrease your time spent studying, or greatly increase the amount you learn.
This snap ships the upstream binary releases with as few changes as possible.
If you are looking for actual builds from source, consider the anki-woodrow snap.
This snap is not affiliated with the upstream project in any way.
grade: stable
confinement: strict
compression: lzo
layout:
/usr/share/qt5:
symlink: $SNAP/usr/share/qt5
apps:
anki:
command: bin/anki
command-chain:
- bin/remember-ld-library-path
plugs:
- home
- opengl
- network
- browser-support
- audio-playback
- audio-record
environment:
ANKI_BASE: $SNAP_USER_COMMON/anki
QTWEBENGINE_DISABLE_SANDBOX: 1
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/x86_64-linux-gnu/samba:$SNAP/usr/lib/x86_64-linux-gnu/blas:$SNAP/usr/lib/x86_64-linux-gnu/lapack
PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$SNAP/lib/python3.10/site-packages
QT_PLUGIN_PATH: $SNAP/usr/lib/x86_64-linux-gnu/qt5/plugins:$SNAP/usr/lib/x86_64-linux-gnu
QTWEBENGINEPROCESS_PATH: $SNAP/usr/lib/x86_64-linux-gnu/qt5/libexec/QtWebEngineProcess
DISABLE_WAYLAND: 1
extensions:
- gnome
parts:
launchers:
plugin: dump
source: launchers/
organize:
"*": bin/
wrappers:
plugin: dump
source: wrappers/
organize:
"*": wrappers/
anki:
plugin: python
source: .
stage-packages:
- libnss3
- libxcb-icccm4
- libxcb-image0
- libxcb-keysyms1
- libxcb-randr0
- libxcb-render-util0
- libxcb-shape0
- libxcb-xinerama0
- libxcb-xkb1
- libxkbcommon-x11-0
- mpv
- libxv1
- samba-libs
- python3-pyqt5
- python3-pyqt5.qtwebengine
- python3-pyqt5.qtwebchannel
- python3-pyqt5.qtmultimedia
- libqt5multimedia5-plugins
- lame
build-environment:
- VIRTUAL_ENV: "$CRAFT_PART_INSTALL"
- PATH: "$VIRTUAL_ENV/bin:$PATH"
python-packages:
- aqt==${SNAPCRAFT_PROJECT_VERSION}
prime:
- -bin/python*
cleanup:
after: [launchers, wrappers, anki]
plugin: nil
override-prime: |
set -eux
for CRUFT in bug lintian man; do
rm -rf $CRAFT_PRIME/usr/share/$CRUFT
done
find $CRAFT_PRIME/usr/share/doc/ -type f -not -name 'copyright' -delete
find $CRAFT_PRIME/usr/share -type d -empty -delete