-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathorg.b3log.siyuan.yml
65 lines (65 loc) · 2.67 KB
/
org.b3log.siyuan.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
app-id: org.b3log.siyuan
runtime: org.freedesktop.Platform
runtime-version: &runtime-version '24.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: *runtime-version
command: start-siyuan.sh
finish-args:
- --device=dri
- --persist=SiYuan
- --persist=.config/siyuan
- --persist=.config/SiYuan
- --persist=.config/SiYuan-Electron
# Allow Siyuan to read media files from host
- --filesystem=xdg-pictures:ro
- --filesystem=xdg-videos:ro
- --filesystem=xdg-music:ro
# Allow users to export documents and create new workspace
# to ~/Desktop, ~/Downloads and ~/Documents
- --filesystem=xdg-desktop
- --filesystem=xdg-download
- --filesystem=xdg-documents
- --share=ipc
- --share=network
- --socket=x11
- --talk-name=org.kde.StatusNotifierWatcher
# To fix cursor scaling on wayland
- --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons
modules:
- name: siyuan
buildsystem: simple
build-commands:
- mv "siyuan" ${FLATPAK_DEST}/siyuan
- rm ${FLATPAK_DEST}/siyuan/chrome-sandbox
# To allow separate locales
# https://searchfox.org/mozilla-central/rev/8a4f55bc09ffc5c25dcb4586c51ae4a9fee77b4c/taskcluster/docker/firefox-flatpak/runme.sh#131-133
- |
for lang in ${FLATPAK_DEST}/siyuan/locales/*.pak
do
locale="$(basename -s .pak $lang)"
install -Dm644 -t "${FLATPAK_DEST}/share/runtime/locale/${locale%%-*}/" "$lang"
ln -sf "${FLATPAK_DEST}/share/runtime/locale/${locale%%-*}/$(basename $lang)" "${FLATPAK_DEST}/siyuan/locales/$(basename $lang)"
done
- install -Dm644 "${FLATPAK_DEST}/siyuan/resources/stage/icon-large.png" "${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/${FLATPAK_ID}.png"
- install -Dm644 org.b3log.siyuan.desktop "${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop"
- install -Dm644 org.b3log.siyuan.metainfo.xml /app/share/metainfo/$FLATPAK_ID.metainfo.xml
- install -Dm755 start-siyuan.sh /app/bin/start-siyuan.sh
sources:
- type: archive
dest: siyuan
only-arches: [x86_64]
url: https://github.com/siyuan-note/siyuan/releases/download/v3.1.20/siyuan-3.1.20-linux.tar.gz
sha256: 8a57f21893d2e99aad4e4c574c8c0d7ee06e1b3576083612a49ef1560d0498cb
x-checker-data:
is-main-source: true
type: anitya
project-id: 358424
url-template: https://github.com/siyuan-note/siyuan/releases/download/v$version/siyuan-$version-linux.tar.gz
stable-only: true
- type: file
path: org.b3log.siyuan.desktop
- type: file
path: org.b3log.siyuan.metainfo.xml
- type: file
path: start-siyuan.sh