forked from flathub/io.podman_desktop.PodmanDesktop
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathio.podman_desktop.PodmanDesktop.yml
More file actions
125 lines (117 loc) · 5.41 KB
/
io.podman_desktop.PodmanDesktop.yml
File metadata and controls
125 lines (117 loc) · 5.41 KB
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
app-id: io.podman_desktop.PodmanDesktop
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:
- "--socket=x11"
- "--share=ipc"
- "--device=dri"
- "--filesystem=home"
- "--filesystem=xdg-run/podman:create"
- "--filesystem=xdg-run/containers/auth.json"
- "--filesystem=/run/docker.sock"
- "--share=network"
- "--talk-name=org.freedesktop.Notifications"
- "--talk-name=org.kde.StatusNotifierWatcher"
- "--talk-name=org.freedesktop.Flatpak"
# required to fix cursor scaling on wayland https://github.com/electron/electron/issues/19810 when the user uses --socket=wayland in their flatpak run
- "--env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons"
modules:
# Podman Desktop sources
- name: podman-desktop
buildsystem: simple
build-options:
append-path: /usr/lib/sdk/node20/bin
env:
npm_config_nodedir: /usr/lib/sdk/node20
XDG_CACHE_HOME: /run/build/podman-desktop/flatpak-node/cache
DEBUG: electron-rebuild,electron-builder
build-commands:
# Display tooling version
- chmod 755 pnpm
- node --version
- ./pnpm --version
- sed -i "s#postinstall\":\ \"\(.*\)\"#postinstall\":\ \"\"#g" package.json # remove playwright install step that downloads at runtime files from internet
- mkdir pnpm-store && mv v3 pnpm-store/
- ./pnpm install --loglevel debug --offline --frozen-lockfile --store-dir ./pnpm-store
# Replace segment key
- sed -i -r -e "s/SEGMENT_KEY = '.*'/SEGMENT_KEY = '$(echo -n 'ODdEZUpwVFhmU05pemF5MUNxQXhsSzViYUQ4VUE1NUQ=' | base64 --decode)'/" packages/main/src/plugin/telemetry/telemetry.ts
- . ./electron-builder-env.sh; ./pnpm run build
- . ./electron-builder-env.sh; ./node_modules/.bin/electron-builder build --config .electron-builder.config.cjs --linux --dir
- cp -a dist/linux*unpacked /app/main
- for size in {32,64,128,256,512}; do
rsvg-convert -w $size -h $size -f png -o "${FLATPAK_ID}.png" "buildResources/icon.svg";
echo "generating ${FLATPAK_ID} png file for size ${size}";
install -p -Dm644 "${FLATPAK_ID}.png" -t "${FLATPAK_DEST}/share/icons/hicolor/${size}x${size}/apps/";
done;
# add scalable svg icon
- install -p -Dm644 "buildResources/icon.svg" "${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg";
# add metainfo
- install -Dm644 ".flatpak-appdata.xml" "${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml"
# add desktop file
- install -Dm644 .flatpak.desktop /app/share/applications/${FLATPAK_ID}.desktop
# Install run script
- install -Dm755 -t /app/bin/ run.sh
sources:
# pnpm tool used to build the project
- type: file
url: https://github.com/pnpm/pnpm/releases/download/v9.7.1/pnpm-linux-x64
dest-filename: pnpm
sha256: 7db041074a5479713e8ced6c79b7a2874f957ce566cd6f53caf0c5ba4568fcf6
only-arches:
- x86_64
- type: file
url: https://github.com/pnpm/pnpm/releases/download/v9.7.1/pnpm-linux-arm64
dest-filename: pnpm
sha256: 2625b2095a6722c0265deeec5f7779750c6abae317f30001eb20fba9f092d6cc
only-arches:
- aarch64
# source code of Podman Desktop:
- type: archive
url: https://github.com/containers/podman-desktop/archive/refs/tags/v1.14.1.tar.gz
sha256: bd822162b15c172706cc65fdc404a7174c3d0c6e4927ccebb58bfab87b5cc2b9
# all dependencies being used for x64 arch
- type: archive
url: https://github.com/containers/podman-desktop/releases/download/v1.14.1/store-cache-pnpm-amd64.tgz
sha256: b917707c1679f0171f8ecbdd0781e3441621b170f072dcc16702f51ef1d18520
only-arches:
- x86_64
# all dependencies being used for arm64 arch
- type: archive
url: https://github.com/containers/podman-desktop/releases/download/v1.14.1/store-cache-pnpm-arm64.tgz
sha256: f1560ea57715b52b6c506e20be805cbc1ed6ea0a1ee7ba7c4b591685ab71166a
only-arches:
- aarch64
# electron used for arm64
- type: file
url: https://github.com/electron/electron/releases/download/v33.0.2/electron-v33.0.2-linux-arm64.zip
sha256: 43157d520ff6094ef7c390e49d1eec1ba58a488e150114c08e7157fb321fca7b
dest: electron-cache/
only-arches:
- aarch64
# electron used for x64
- type: file
url: https://github.com/electron/electron/releases/download/v33.0.2/electron-v33.0.2-linux-x64.zip
sha256: 933dc1eae3f2db67912b3ab056fd15a7ca3e1328fe8dd6a1f5266c5a063b1121
dest: electron-cache/
only-arches:
- x86_64
# - generated-sources.json
- type: script
dest-filename: run.sh
commands:
# Wrapper to launch the app
- export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID"
- zypak-wrapper.sh /app/main/podman-desktop "$@"
- type: script
dest-filename: electron-builder-env.sh
commands:
- export MODE=production
- export ELECTRON_CACHE="$(pwd)/electron-cache"
- export ELECTRON_BUILDER_ARCH_ARGS=$(case "$FLATPAK_ARCH" in "i386") echo "--ia32" ;; "x86_64") echo "--x64" ;; "arm") echo "--armv7l" ;; "aarch64") echo "--arm64" ;; esac)