-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnet.hovancik.Stretchly.yaml
80 lines (79 loc) · 3.09 KB
/
net.hovancik.Stretchly.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
app-id: net.hovancik.Stretchly
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.node20
command: run.sh
separate-locales: false
finish-args:
- --device=dri
- --env=GIO_EXTRA_MODULES=/app/lib/gio/modules/
- --share=ipc
- --socket=pulseaudio
- --socket=x11
# todo While Stretchly can be run under Wayland, it doesn't work right with multiple screens.
# - --socket=fallback-x11
# - --socket=wayland
- --share=network
- --talk-name=org.freedesktop.Notifications
# Tray on KDE
- --talk-name=org.kde.StatusNotifierWatcher
modules:
- shared-modules/dbus-glib/dbus-glib.json
- name: stretchly
buildsystem: simple
build-options:
append-path: /usr/lib/sdk/node18/bin
env:
XDG_CACHE_HOME: /run/build/stretchly/flatpak-node/cache
NPM_CONFIG_LOGLEVEL: info
npm_config_cache: /run/build/stretchly/flatpak-node/npm-cache
npm_config_offline: 'true'
npm_config_nodedir: /usr/lib/sdk/node18
sources:
- type: git
url: https://github.com/hovancik/stretchly.git
tag: v1.16.0
commit: 5496af8fdb50c8d718e4da8bff9735bb826d31ce
x-checker-data:
type: json
url: https://api.github.com/repos/hovancik/stretchly/releases/latest
tag-query: .tag_name
version-query: .tag_name | sub("^v"; "")
timestamp-query: .published_at
- generated-sources.json
- type: script
dest-filename: run.sh
commands:
- export TMPDIR=$XDG_CACHE_HOME
- export ZYPAK_SPAWN_LATEST_ON_REEXEC=0
- export CHROME_WRAPPER=/app/bin/run.sh
- |
echo "WAYLAND_DISPLAY: $WAYLAND_DISPLAY"
echo "XDG_RUNTIME_DIR: $XDG_RUNTIME_DIR"
ls $XDG_RUNTIME_DIR
if [ -e "$WAYLAND_DISPLAY" ]; then
FLAGS="$FLAGS --enable-features=UseOzonePlatform --ozone-platform=wayland"
if [ -c /dev/nvidia0 ]; then
FLAGS="$FLAGS --disable-gpu-sandbox"
fi
fi
zypak-wrapper /app/main/stretchly $FLAGS "$@"
build-commands:
- |
ln -s $XDG_CACHE_HOME/node-gyp $HOME/.electron-gyp
npm install --offline
- |
ln -s $XDG_CACHE_HOME/node-gyp $HOME/.electron-gyp
. flatpak-node/electron-builder-arch-args.sh
npm run pack -- $ELECTRON_BUILDER_ARCH_ARGS --linux
- cp -a dist/linux*unpacked /app/main
- install -Dm 755 -t /app/bin/ run.sh
- install -Dm 644 net.hovancik.Stretchly.desktop /app/share/applications/$FLATPAK_ID.desktop
- sed -i 's/Icon=net.hovancik.Stretchly/Icon=net.hovancik.Stretchly/' /app/share/applications/$FLATPAK_ID.desktop
- install -Dm 644 net.hovancik.Stretchly.metainfo.xml /app/share/metainfo/$FLATPAK_ID.metainfo.xml
- sed -i 's/net.hovancik.Stretchly/net.hovancik.Stretchly/' /app/share/metainfo/$FLATPAK_ID.metainfo.xml
- install -Dm644 app/images/stretchly.svg /app/share/icons/hicolor/scalable/apps/$FLATPAK_ID.svg