-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathorg.nanuc.Axolotl.yml
206 lines (197 loc) · 7.21 KB
/
org.nanuc.Axolotl.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
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
app-id: org.nanuc.Axolotl
runtime: org.freedesktop.Platform
runtime-version: '22.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.golang
- org.freedesktop.Sdk.Extension.node18
- org.freedesktop.Sdk.Extension.rust-stable
command: run.sh
base: org.electronjs.Electron2.BaseApp
base-version: '22.08'
separate-locales: false
build-options:
append-path: "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/golang/bin:/usr/lib/sdk/node18/bin"
env:
CARGO_NET_OFFLINE: true
npm_config_nodedir: /usr/lib/sdk/node18
cleanup:
- /app/bin/astilectron-bundler
finish-args:
# See https://docs.flatpak.org/en/latest/sandbox-permissions-reference.html
# Write access for the user download folder (to save media)
- --filesystem=xdg-download:rw
# File access for configs (read/write access, and create the directory if it doesn’t exist)
- --filesystem=~/.local/share/textsecure.nanuc:create
- --filesystem=~/.config/textsecure.nanuc:create
# Read access for home folder (to upload media)
- --filesystem=home:ro
# Network access - to receive and send messages
- --share=network
# X11 + XShm access
- --share=ipc
- --socket=fallback-x11
# Wayland access
- --socket=wayland
# Sound access
- --socket=pulseaudio
# OpenGL access
- --device=dri
# To send and receive notifications
- --talk-name=org.freedesktop.Notifications
# Run with bundled Electron
- --env=AXOLOTL_ELECTRON_BUNDLED="true"
# Specify axolotl-web location
- --env=AXOLOTL_WEB_DIR=/app/lib/astibundler/bind/axolotl-web/dist
modules:
- name: crayfish
buildsystem: simple
build-options:
env:
CARGO_HOME: /run/build/crayfish/cargo
subdir: src/github.com/nanu-c/axolotl
build-commands:
- cargo fetch --manifest-path crayfish/Cargo.toml
- make build-crayfish
- make install-crayfish DESTDIR=${FLATPAK_DEST} INSTALL_PREFIX=/bin
sources:
- generated-crayfish-sources.json
- type: git
url: https://github.com/nanu-c/axolotl
tag: v1.6.0
commit: e521ab32b5bf315866a17f6844e5339abbc41e79
dest: src/github.com/nanu-c/axolotl
x-checker-data:
type: git
tag-pattern: "^v([\\d.]+)$"
- name: zkgroup
buildsystem: simple
subdir: src/github.com/nanu-c/zkgroup/lib
build-commands:
- install -Dm 755 libzkgroup_linux_${FLATPAK_ARCH}.so ${FLATPAK_DEST}/lib/libzkgroup_linux_${FLATPAK_ARCH}.so
sources:
- type: git
url: https://github.com/nanu-c/zkgroup
tag: v0.9.0
commit: e00e74649ddc88eff10ba8e4c40dafdb06dcf494
dest: src/github.com/nanu-c/zkgroup
disable-submodules: true
x-checker-data:
type: git
tag-pattern: "^v([\\d.]+)$"
- name: astilectron-bundler
buildsystem: simple
build-options:
env:
GOBIN: /app/bin
GO111MODULE: off
GOPATH: /run/build/astilectron-bundler
subdir: src/github.com/asticode/go-astilectron-bundler
build-commands:
- go install -v github.com/asticode/go-astilectron-bundler/...
sources:
- generated-astilectron-bundler-sources.json
- type: git
url: https://github.com/asticode/go-astilectron-bundler
tag: v0.7.12
commit: 9ca0b71fdf5533e4aa17f7587fb747d3874a7315
dest: src/github.com/asticode/go-astilectron-bundler
x-checker-data:
type: git
tag-pattern: "^v([\\d.]+)$"
- name: astilectron-bundler-astilectron
buildsystem: simple
build-options:
env:
BUNDLER_CACHE: /app/lib/astibundler/cache
build-commands:
- install -Dm 644 astilectron-0.56.0.zip ${BUNDLER_CACHE}/astilectron-0.56.0.zip
sources:
- type: file
url: https://github.com/asticode/astilectron/archive/v0.56.0.zip
sha256: 2725492843edaef0530543c041c5c7d9e43d4163f5c192fc8da11ce89fcaa0f5
dest-filename: astilectron-0.56.0.zip
- name: astilectron-bundler-electron-amd64
buildsystem: simple
only-arches:
- x86_64
build-options:
env:
BUNDLER_CACHE: /app/lib/astibundler/cache
build-commands:
- install -Dm 644 electron-linux-amd64-20.2.0.zip ${BUNDLER_CACHE}/electron-linux-amd64-20.2.0.zip
sources:
- type: file
url: https://github.com/electron/electron/releases/download/v20.2.0/electron-v20.2.0-linux-x64.zip
sha256: c0e3522de34819b838f4a35ddf30c6283c61be1bb8dff02089cda3f641938aad
dest-filename: electron-linux-amd64-20.2.0.zip
- name: astilectron-bundler-electron-arm64
buildsystem: simple
only-arches:
- aarch64
build-options:
env:
BUNDLER_CACHE: /app/lib/astibundler/cache
build-commands:
- install -Dm 644 electron-linux-arm64-20.2.0.zip ${BUNDLER_CACHE}/electron-linux-arm64-20.2.0.zip
sources:
- type: file
url: https://github.com/electron/electron/releases/download/v20.2.0/electron-v20.2.0-linux-arm64.zip
sha256: 1d2dd05f060786eae5ce687794aa071df8a5f5733b7b2efa1481de8db75d7738
dest-filename: electron-linux-arm64-20.2.0.zip
- name: axolotl-electron-bundle
buildsystem: simple
build-options:
env:
npm_config_offline: "true"
npm_config_cache: /run/build/axolotl-electron-bundle/flatpak-node/npm-cache
GOBIN: /app/bin
GO111MODULE: off
GOPATH: /run/build/axolotl-electron-bundle
subdir: src/github.com/nanu-c/axolotl
build-commands:
- make build-dependencies-axolotl-web
- make build-axolotl-web
# Specify bundler working directory (where Electron and Astilectron is)
- echo "$(jq '. + { working_directory_path:"/app/lib/astibundler" }' bundler.json)" > bundler.json
- make build-axolotl-electron-bundle &
while [ -e /proc/$! ]; do echo -n "."; sleep 100; done
- make install-axolotl-electron-bundle DESTDIR=${FLATPAK_DEST} INSTALL_PREFIX=/bin
sources:
- generated-axolotl-web-sources.0.json
- generated-axolotl-sources.json
- type: git
url: https://github.com/nanu-c/axolotl
tag: v1.6.0
commit: e521ab32b5bf315866a17f6844e5339abbc41e79
dest: src/github.com/nanu-c/axolotl
x-checker-data:
type: git
tag-pattern: "^v([\\d.]+)$"
- name: metadata
buildsystem: simple
subdir: src/github.com/nanu-c/axolotl
build-commands:
- install -Dm 644 flatpak/org.nanuc.Axolotl.png ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps/${FLATPAK_ID}.png
- install -Dm 644 flatpak/org.nanuc.Axolotl.appdata.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml
- install -Dm 644 flatpak/web/org.nanuc.Axolotl.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop
sources:
- type: git
url: https://github.com/nanu-c/axolotl
tag: v1.6.0
commit: e521ab32b5bf315866a17f6844e5339abbc41e79
dest: src/github.com/nanu-c/axolotl
x-checker-data:
type: git
tag-pattern: "^v([\\d.]+)$"
- name: run
buildsystem: simple
build-commands:
- install -Dm 755 run.sh ${FLATPAK_DEST}/bin/run.sh
sources:
- type: script
dest-filename: run.sh
commands:
- export DISPLAY=:0
- export WAYLAND_DISPLAY=wayland-0
- zypak-wrapper /app/bin/axolotl-electron-bundle "$@"