-
Notifications
You must be signed in to change notification settings - Fork 13
/
net.ankiweb.Anki.yaml
237 lines (232 loc) · 8.74 KB
/
net.ankiweb.Anki.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
app-id: net.ankiweb.Anki
runtime: org.kde.Platform
runtime-version: '6.7'
sdk: org.kde.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
- org.freedesktop.Sdk.Extension.node20
base: com.riverbankcomputing.PyQt.BaseApp
base-version: '6.7'
cleanup-commands:
- /app/cleanup-BaseApp.sh
build-options:
append-path: /usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/node20/bin
env:
npm_config_nodedir: /usr/lib/sdk/node20
add-extensions:
org.freedesktop.Sdk.Extension.texlive:
version: '23.08'
directory: texlive
add-ld-path: lib
no-autodownload: true
command: anki
rename-desktop-file: anki.desktop
rename-icon: anki
finish-args:
- --socket=wayland
- --socket=fallback-x11
- --share=ipc
- --device=dri
- --socket=pulseaudio
- --share=network
# Allow other instances to see lockfiles
- --env=TMPDIR=/var/tmp
# IBus support
- --env=IBUS_USE_PORTAL=1
# LaTeX
- --env=PATH=/app/bin:/usr/bin:/app/texlive/bin/x86_64-linux:/app/texlive/bin/aarch64-linux
# QtWebEngineProcess from baseapp
- --env=QTWEBENGINEPROCESS_PATH=/app/bin/QtWebEngineProcess
# Fix for fractional scaling fonts on wayland
- --env=QT_SCALE_FACTOR_ROUNDING_POLICY=round
cleanup:
- '*.a'
- '*.la'
- /include
- /etc
- /man
- /lib/pkgconfig
- /lib/metatypes
- /share/bash-completion
- /share/doc
- /share/man
- /share/zsh
modules:
- name: texlive
buildsystem: simple
build-commands:
- install -d /app/texlive
- name: mpv
buildsystem: meson
config-opts:
- -Dbuild-date=false
- -Dlibmpv=false
- -Dmanpage-build=disabled
sources:
- type: archive
url: https://github.com/mpv-player/mpv/archive/v0.38.0.tar.gz
sha256: 86d9ef40b6058732f67b46d0bbda24a074fae860b3eaae05bab3145041303066
# x-checker-data:
# type: anitya
# project-id: 5348
# stable-only: true
# url-template: https://github.com/mpv-player/mpv/archive/refs/tags/v$version.tar.gz
modules:
- name: libplacebo
buildsystem: meson
config-opts:
- -Dd3d11=disabled
- -Ddemos=False
sources:
- type: archive
url: https://code.videolan.org/videolan/libplacebo/-/archive/v7.349.0/libplacebo-v7.349.0.tar.gz
sha256: 79120e685a1836344b51b13b6a5661622486a84e4d4a35f6c8d01679a20fbc86
x-checker-data:
type: anitya
project-id: 20101
stable-only: true
url-template: https://code.videolan.org/videolan/libplacebo/-/archive/v$version/libplacebo-v$version.tar.gz
- type: archive
url: https://github.com/pallets/jinja/archive/refs/tags/3.1.4.tar.gz
sha256: ed06f67abd2c8b7697dfb714f80715903ab0507e3c5acc11e92477e4ea51033b
# x-checker-data:
# type: anitya
# project-id: 3894
# stable-only: true
# url-template: https://github.com/pallets/jinja/archive/refs/tags/$version.tar.gz
dest: 3rdparty/jinja
- type: archive
url: https://github.com/Dav1dde/glad/archive/refs/tags/v2.0.8.tar.gz
sha256: 44f06f9195427c7017f5028d0894f57eb216b0a8f7c4eda7ce883732aeb2d0fc
# x-checker-data:
# type: anitya
# project-id: 300234
# stable-only: true
# url-template: https://github.com/Dav1dde/glad/archive/refs/tags/v$version.tar.gz
dest: 3rdparty/glad
modules:
- name: glslang
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DBUILD_SHARED_LIBS=ON
cleanup:
- /bin
sources:
- type: archive
url: https://github.com/KhronosGroup/glslang/archive/14.3.0.tar.gz
sha256: be6339048e20280938d9cb399fcdd06e04f8654d43e170e8cce5a56c9a754284
# x-checker-data:
# type: anitya
# project-id: 205796
# stable-only: true
# url-template: https://github.com/KhronosGroup/glslang/archive/$version.tar.gz
- type: archive
url: https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/sdk-1.3.261.1.tar.gz
sha256: ead95c626ad482882a141d1aa0ce47b9453871f72c42c0b28d39c82f60a52008
dest: External/spirv-tools
# x-checker-data:
# type: anitya
# stable-only: true
# project-id: 334920
# url-template: https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/sdk-$version.tar.gz
- type: archive
url: https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/sdk-1.3.261.1.tar.gz
sha256: 32b4c6ae6a2fa9b56c2c17233c8056da47e331f76e117729925825ea3e77a739
dest: External/spirv-tools/external/spirv-headers
# x-checker-data:
# type: anitya
# stable-only: true
# project-id: 334920
# url-template: https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/sdk-$version.tar.gz
- name: libass
config-opts:
- --disable-static
sources:
- type: archive
url: https://github.com/libass/libass/releases/download/0.17.3/libass-0.17.3.tar.xz
sha256: eae425da50f0015c21f7b3a9c7262a910f0218af469e22e2931462fed3c50959
# x-checker-data:
# type: anitya
# project-id: 1560
# stable-only: true
# url-template: https://github.com/libass/libass/releases/download/$version/libass-$version.tar.xz
- python3-modules.json # stringcase beautifulsoup4 waitress requests decorator markdown protobuf pysocks distro send2trash certifi flask-cors jsonschema orjson
# manual: maturin
- name: rsync
cleanup:
- /share
sources:
- type: archive
url: https://download.samba.org/pub/rsync/src/rsync-3.3.0.tar.gz
sha256: 7399e9a6708c32d678a72a63219e96f23be0be2336e50fd1348498d07041df90
x-checker-data:
type: anitya
project-id: 4217
versions:
<: '4.0'
url-template: https://download.samba.org/pub/rsync/src/rsync-$version.tar.gz
- name: anki
buildsystem: simple
build-options:
env:
OFFLINE_BUILD: '1'
RELEASE: '2'
PYTHON_BINARY: /usr/bin/python
NODE_BINARY: /usr/lib/sdk/node20/bin/node
YARN_BINARY: /usr/lib/sdk/node20/bin/yarn
PROTOC_BINARY: /run/build/anki/protoc
CARGO_HOME: /run/build/anki/cargo
XDG_CACHE_HOME: /run/build/anki/flatpak-node/cache
build-commands:
# python pseudo venv
- mkdir -p out/pyenv/bin
- ln -s $PYTHON_BINARY out/pyenv/bin/python
# deps
- cargo fetch --manifest-path ./Cargo.toml
- HOME=$PWD yarn config --offline set yarn-offline-mirror $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn-mirror
- yarn --offline install --modules-folder out/node_modules --ignore-scripts
- ln -sf out/node_modules ./
# build
- ./ninja wheels
# install
- for f in out/wheels/*.whl; do python -m installer --prefix="/app" $f; done
- cp /app/bin/anki ./qt/bundle/lin
- env --chdir=./qt/bundle/lin - PREFIX=/app ./install.sh
- install -Dm644 -t /app/share/metainfo net.ankiweb.Anki.metainfo.xml
- install -Dm644 ./qt/bundle/lin/anki.xml /app/share/mime/packages/net.ankiweb.Anki.xml
- install -Dm644 -t /app/share/icons/hicolor/scalable/apps anki.svg
cleanup:
- /share/pixmaps
sources:
- cargo-sources.json
- yarn-sources.json
- type: archive
url: https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-linux-aarch_64.zip
sha256: 1de522032a8b194002fe35cab86d747848238b5e4de4f99648372079f5b46f9a
only-arches:
- aarch64
- type: archive
url: https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-linux-x86_64.zip
sha256: 0ad949f04a6a174da83cdcbdb36dee0a4925272a5b6d83f79a6bf9852076d53f
only-arches:
- x86_64
- type: git
url: https://github.com/ankitects/anki.git
tag: '24.11'
commit: 87ccd24efd0ea635558b1679614b6763e4f514eb
x-checker-data:
type: git
stable-only: true
tag-pattern: ^([\\d.]+)$
- type: patch
paths:
- no-update-check.patch
- strip-python-formatter.patch
- strip-type-checking-deps.patch
- xdg-mime-strip.patch
- desktop-file-name.patch
- type: file
path: net.ankiweb.Anki.metainfo.xml
- type: file
path: anki.svg