-
Notifications
You must be signed in to change notification settings - Fork 10
/
net.cozic.joplin_desktop.yml
119 lines (110 loc) · 4.26 KB
/
net.cozic.joplin_desktop.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
app-id: net.cozic.joplin_desktop
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '24.08'
sdk-extensions:
- org.freedesktop.Sdk.Extension.node20
separate-locales: false
rename-icon: joplin
rename-desktop-file: joplin.desktop
command: joplin-desktop
finish-args:
- --socket=pulseaudio
- --socket=x11
- --device=dri
- --share=ipc
- --share=network
- --filesystem=home
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.kde.StatusNotifierWatcher
- --talk-name=com.canonical.AppMenu.Registrar
- --socket=cups
- --system-talk-name=org.freedesktop.Avahi
# gtk-cups-backend
# - --env=GTK_PATH=/app/lib/gtkmodules
#
modules:
- shared-modules/libsecret/libsecret.json
# - cups/gtk-cups-backend.yml
- name: rsync
config-opts:
- --with-included-popt
- --disable-md2man
cleanup:
- /share
sources:
- type: git
url: https://github.com/RsyncProject/rsync.git
commit: 36212021f0b8f64d28a5713f6b485f97857187f1
- name: joplin
buildsystem: simple
build-options:
append-path: /usr/lib/sdk/node20/bin
env:
XDG_CACHE_HOME: /run/build/joplin/flatpak-node/cache
npm_config_nodedir: /usr/lib/sdk/node20
YARN_ENABLE_INLINE_BUILDS: '1'
YARN_ENABLE_TELEMETRY: '0'
YARN_ENABLE_NETWORK: '0'
YARN_ENABLE_GLOBAL_CACHE: '0'
SHARP_IGNORE_GLOBAL_LIBVIPS: '1'
YARN_GLOBAL_FOLDER: /run/build/joplin/flatpak-node/yarn-mirror/global
TMPDIR: /run/build/joplin/flatpak-tmp
build-commands:
- yarn config
- yarn plugin import $FLATPAK_BUILDER_BUILDDIR/flatpak-node/flatpak-yarn.js
- yarn convertToZip $(which yarn)
- yarn install
# generateSha512.js require appimage build, need touch it
# If no it will cause electron-builder failed without error message even set debug!
- mkdir -p packages/app-desktop/dist && touch packages/app-desktop/dist/AppImage
- |
. flatpak-node/electron-builder-arch-args.sh
cd packages/app-desktop
yarn run dist $ELECTRON_BUILDER_ARCH_ARGS --config.asar=false --linux --dir
- |
cd packages/app-desktop
cp -r dist/linux*unpacked /app/joplin-desktop
mv /app/joplin-desktop/{@joplinapp-desktop,joplin}
for size in 16 32 64 128 256; do
[[ -e "build/icons/${size}x${size}.png" ]] && \
install -Dm644 "build/icons/${size}x${size}.png" \
"/app/share/icons/hicolor/${size}x${size}/apps/joplin.png";
done
- install -Dm755 joplin.desktop -t /app/share/applications
- install -Dm644 ${FLATPAK_ID}.appdata.xml -t /app/share/metainfo
- install -Dm755 joplin-desktop.sh /app/bin/joplin-desktop
sources:
- type: archive
url: https://github.com/laurent22/joplin/archive/v3.1.24.tar.gz
sha256: f529bc54928dcee1fcf67bcba54abee856afb996b7bc4e022055a5d92d523017
x-checker-data:
type: json
url: https://api.github.com/repos/laurent22/joplin/releases/latest
version-query: .tag_name | sub("^v"; "")
url-query: '"https://github.com/laurent22/joplin/archive/v" + $version +
".tar.gz"'
timestamp-query: .published_at
- type: shell
commands:
# set desktop filename for wayland
- jq '.desktopName = "net.cozic.joplin_desktop"' packages/app-desktop/package.json > package.json.tmp && mv package.json.tmp packages/app-desktop/package.json
- rm -rf packages/app-clipper
- echo '{}' > packages/default-plugins/pluginRepositories.json
- generated-sources.json
- type: file
path: joplin.desktop
- type: file
path: net.cozic.joplin_desktop.appdata.xml
- type: script
dest-filename: joplin-desktop.sh
commands:
- export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID
- if ([[ $WAYLAND_DISPLAY == /* ]] && [ -e $WAYLAND_DISPLAY ]) || [ -e $XDG_RUNTIME_DIR/${WAYLAND_DISPLAY:=wayland-0}
]; then
- wayland_opt="--enable-features=UseOzonePlatform,WaylandWindowDecorations
--ozone-platform=wayland $wayland_opt"
- fi
- exec zypak-wrapper /app/joplin-desktop/joplin $wayland_opt "$@"