-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtech.feliciano.pocket-casts.yml
88 lines (87 loc) · 3.33 KB
/
tech.feliciano.pocket-casts.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
app-id: tech.feliciano.pocket-casts
runtime: org.freedesktop.Platform
runtime-version: &runtime-version '24.08'
sdk: org.freedesktop.Sdk
# Add the Node 20 SDK extension.
sdk-extensions:
- org.freedesktop.Sdk.Extension.node20
base: org.electronjs.Electron2.BaseApp
base-version: *runtime-version
command: run.sh
separate-locales: false
finish-args:
# Share IPC namespace with the host, without it the X11 shared memory extension will not work.
- --share=ipc
# Show windows using Wayland with a fallback to Xorg.
- --socket=wayland
- --socket=fallback-x11
# Pulseaudio for audio.
- --socket=pulseaudio
# Allow access to the network.
- --share=network
# Required for hardware acceleration.
- --device=dri
# Allow access to appindicator icons on KDE
- --talk-name=org.kde.StatusNotifierWatcher
- --talk-name=com.canonical.AppMenu.Registrar
# Allow access to MPRIS controls.
- --own-name=org.mpris.MediaPlayer2.chromium.*
modules:
- name: node
buildsystem: simple
build-commands:
- /usr/lib/sdk/node20/install-sdk.sh
- name: pocket-casts
buildsystem: simple
build-options:
# Add the node bin directory.
append-path: /usr/lib/sdk/node20/bin
env:
XDG_CACHE_HOME: /run/build/pocket-casts/flatpak-node/cache
npm_config_cache: /run/build/pocket-casts/flatpak-node/npm-cache
npm_config_nodedir: /usr/lib/sdk/node20
sources:
- type: git
url: https://github.com/felicianotech/pocket-casts-desktop-app
tag: v0.8.0
commit: 06d0439647b500b0ab84566d2d9028d1cff5ede6
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$
- "generated-sources.json"
# https://github.com/FelicianoTech/pocket-casts-desktop-app/pull/103
- type: patch
path: update-release-notes.patch
use-git-am: true
# https://github.com/FelicianoTech/pocket-casts-desktop-app/pull/104
- type: patch
path: 0001-Don-t-print-text-on-exit.patch
use-git-am: true
- type: script
dest-filename: run.sh
commands:
- export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID
- WAYLAND_SOCKET=${WAYLAND_DISPLAY:-"wayland-0"}
- FLAGS=""
- if [[ -e "$XDG_RUNTIME_DIR/${WAYLAND_SOCKET}" || -e "${WAYLAND_DISPLAY}"
]]; then
- FLAGS="$FLAGS --enable-features=WaylandWindowDecorations --ozone-platform-hint=auto"
- fi
- FLATPAK_HOST=1 zypak-wrapper.sh /app/lib/pocket-casts/pocket-casts
$FLAGS "$@"
build-commands:
# Install NPM Dependencies
- npm install --offline
# Run electron-forge package
- npm run package
# Install package to ${FLATPAK_DEST}
- mkdir -p ${FLATPAK_DEST}/lib/pocket-casts
- cp -r out/pocket-casts-linux-*/* ${FLATPAK_DEST}/lib/pocket-casts
# Install upstream icon
- install -Dm644 icon.png ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/${FLATPAK_ID}.png
# Install upstream desktop file
- install -Dm644 flatpak/tech.feliciano.pocket-casts.desktop /app/share/applications/${FLATPAK_ID}.desktop
# Install upstream metainfo.
- install -Dm644 flatpak/tech.feliciano.pocket-casts.appdata.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml
# Install Flatpak specific wrapper
- install -Dm755 run.sh ${FLATPAK_DEST}/bin/run.sh