forked from flathub/net.cozic.joplin_desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
net.cozic.joplin_desktop.yml
137 lines (127 loc) · 4.67 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
app-id: net.cozic.joplin_desktop
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '23.08'
sdk-extensions:
- org.freedesktop.Sdk.Extension.node18
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
# gtk-cups-backend
- --env=GTK_PATH=/app/lib/gtkmodules
- --socket=cups
- --system-talk-name=org.freedesktop.Avahi
modules:
- shared-modules/libsecret/libsecret.json
- cups/gtk-cups-backend.yml
- name: libvips
buildsystem: meson
builddir: true
cleanup:
- '*'
sources:
- type: archive
url: https://github.com/libvips/libvips/archive/refs/tags/v8.15.0.tar.gz
sha256: 990641f1c10f1df238719b28e6843275bdefd76de642d197307455f0183c02c3
x-checker-data:
type: anitya
project-id: 5097
url-template: https://github.com/libvips/libvips/archive/refs/tags/v$version.tar.gz
- name: rsync
config-opts:
- --disable-xxhash
- --disable-zstd
cleanup:
- /share
sources:
- type: archive
url: https://download.samba.org/pub/rsync/src/rsync-3.2.7.tar.gz
sha256: 4e7d9d3f6ed10878c58c5fb724a67dacf4b6aac7340b13e488fb2dc41346f2bb
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: joplin
buildsystem: simple
build-options:
append-path: /usr/lib/sdk/node18/bin
env:
XDG_CACHE_HOME: /run/build/joplin/flatpak-node/cache
npm_config_nodedir: /usr/lib/sdk/node18
build-commands:
- rm -rf packages/app-clipper
- $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn2-setup.sh
- 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 clean-gpucache.sh -t /app/bin
- install -Dm755 joplin-desktop.sh /app/bin/joplin-desktop
sources:
- type: archive
url: https://github.com/laurent22/joplin/archive/v2.12.19.tar.gz
sha256: 4aa2030b355d5fd1a879ed65ce4016fec416a86779730036bd285fb50a8072b8
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
- generated-sources.json
- type: file
path: joplin.desktop
- type: file
path: net.cozic.joplin_desktop.appdata.xml
- type: script
dest-filename: clean-gpucache.sh
commands:
- set -e
- dir=~/.var/app/net.cozic.joplin_desktop/config/Joplin/GPUCache
- |
for f in $(find $dir -maxdepth 1 -mindepth 1)
do
if [ $(stat --format=%Z /usr/lib/*/libdrm.so.?) -gt $(stat --format=%Y $f) ];then
rm $f
fi
done
- type: script
dest-filename: joplin-desktop.sh
commands:
- /app/bin/clean-gpucache.sh || true
- export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID
- if [ -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 "$@"