forked from flathub/io.github.shiftey.Desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathio.github.shiftey.Desktop.yaml
111 lines (111 loc) · 4.6 KB
/
io.github.shiftey.Desktop.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
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
app-id: io.github.shiftey.Desktop
base: org.electronjs.Electron2.BaseApp
base-version: "23.08"
runtime: org.freedesktop.Platform
runtime-version: "23.08"
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.node18
command: start-github-desktop
separate-locales: false
rename-icon: io.github.shiftey.Desktop
finish-args:
- --share=ipc
- --socket=x11
- --socket=ssh-auth
- --socket=gpg-agent
- --share=network
- --device=all
- --filesystem=host
- --filesystem=/opt/:ro
- --filesystem=/var/lib/flatpak/app:ro
- --filesystem=xdg-run/keyring
- --talk-name=org.freedesktop.Flatpak
- --talk-name=org.freedesktop.secrets
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.gtk.vfs.*
- --talk-name=com.canonical.AppMenu.Registrar
- --env=FLATPAK_HOST=1
- --env=ELECTRON_TRASH=gio
modules:
- shared-modules/libsecret/libsecret.json
- name: gpg
config-opts:
- --disable-doc
- --enable-gpg-is-gpg2
- --disable-tests
sources:
# latest long term support release
- type: archive
url: https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.4.2.tar.bz2
sha256: 97eb47df8ae5a3ff744f868005a090da5ab45cb48ee9836dbf5ee739a4e5cf49
- name: node-gyp
buildsystem: simple
build-commands:
- install -Dm755 node-gyp /app/bin
cleanup:
- "*"
sources:
- type: script
dest-filename: node-gyp
commands:
- node /usr/lib/sdk/node18/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
$@
- name: github-desktop
buildsystem: simple
build-options:
# Add the node bin directory & yarn directory.
append-path: /app/bin:/usr/lib/sdk/node18/bin:/run/build/github-desktop/flatpak-node/chromedriver:/usr/lib/sdk/node18/lib/node_modules/npm/node_modules/node-gyp/bin
env:
# Sets the directory where Node is located so way npm won't download the headers.
npm_config_nodedir: /usr/lib/sdk/node18
# Set the Electron cache directory.
ELECTRON_CACHE: /run/build/github-desktop/flatpak-node/electron-cache
# Skip Electron related downloads
ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
OFFLINE: "1"
CHROMEDRIVER_SKIP_DOWNLOAD: "true"
# Use predownloaded dugite-native
TMPDIR: /run/build/github-desktop/flatpak-node/tmp
XDG_CACHE_HOME: /run/build/github-desktop/flatpak-node/cache
build-commands:
- HOME=$PWD node ./vendor/yarn-1.21.1.js config --offline set yarn-offline-mirror
$FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn-mirror
- ln -s $XDG_CACHE_HOME/node-gyp $HOME/.electron-gyp
- node ./vendor/yarn-1.21.1.js --offline --verbose
# Run electron-builder, passing the architecture arguments to it.
- . flatpak-node/electron-builder-arch-args.sh; node ./vendor/yarn-1.21.1.js
run --offline build:prod $ELECTRON_BUILDER_ARCH_ARGS
# Copy the resulting, unpacked directory to /app.
# (A glob is used because the directory name may contain the current arch.)
- cp -r dist/github-desktop-linux-* /app/github-desktop
# Install the wrapper script to start it.
- install -Dm755 start-github-desktop.sh /app/bin/start-github-desktop
post-install:
- install -D io.github.shiftey.Desktop.desktop -t /app/share/applications/
- install -D io.github.shiftey.Desktop.metainfo.xml -t /app/share/metainfo/
- install -Dm644 app/static/linux/logos/32x32.png /app/share/icons/hicolor/32x32/apps/$FLATPAK_ID.png
- install -Dm644 app/static/linux/logos/64x64.png /app/share/icons/hicolor/64x64/apps/$FLATPAK_ID.png
- install -Dm644 app/static/linux/logos/128x128.png /app/share/icons/hicolor/128x128/apps/$FLATPAK_ID.png
- install -Dm644 app/static/linux/logos/256x256.png /app/share/icons/hicolor/256x256/apps/$FLATPAK_ID.png
- install -Dm644 app/static/linux/logos/512x512.png /app/share/icons/hicolor/512x512/apps/$FLATPAK_ID.png
sources:
- type: git
url: https://github.com/shiftkey/desktop.git
tag: release-3.3.6-linux3
commit: e32359f8d0ea2f1208d0d0f333e4139d1258e115
x-checker-data:
type: git
tag-pattern: release-(\d+\.\d+\.\d+-linux\d+)
- type: patch
path: node_options.patch
- generated-sources.json
- type: file
path: io.github.shiftey.Desktop.desktop
- type: file
path: io.github.shiftey.Desktop.metainfo.xml
- type: script
dest-filename: start-github-desktop.sh
commands:
- export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID
- exec zypak-wrapper /app/github-desktop/github-desktop "$@"