-
Notifications
You must be signed in to change notification settings - Fork 0
/
io.github.mrmyhuang.cbetar2.yml
58 lines (57 loc) · 1.87 KB
/
io.github.mrmyhuang.cbetar2.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
app-id: io.github.mrmyhuang.cbetar2
runtime: org.freedesktop.Platform
runtime-version: '21.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '21.08'
sdk-extensions:
- org.freedesktop.Sdk.Extension.node14
command: run.sh
separate-locales: false
finish-args:
- --share=ipc
- --socket=x11
- --socket=pulseaudio
- --share=network
- --filesystem=home
build-options:
append-path: /usr/lib/sdk/node14/bin
env:
NPM_CONFIG_LOGLEVEL: info
modules:
- name: cbetar2
buildsystem: simple
build-options:
env:
XDG_CACHE_HOME: /run/build/cbetar2/flatpak-node/cache
npm_config_cache: /run/build/cbetar2/flatpak-node/npm-cache
npm_config_offline: 'true'
sources:
- type: git
url: https://github.com/MrMYHuang/cbetar2
tag: 19.2.0
#- type: dir
# path: ..
# dest: main
- generated-sources.json
# Wrapper to launch the app
- type: script
dest-filename: run.sh
commands:
- zypak-wrapper.sh /app/main/cbetar2 "$@"
build-commands:
# Install app wrapper
- install -Dm755 -t /app/bin/ run.sh
# Build the app
- |
# https://github.com/flatpak/flatpak-builder-tools/pull/260
ln -s $XDG_CACHE_HOME/node-gyp $HOME/.electron-gyp
# Install npm dependencies
npm install --offline
. ./flatpak-node/electron-builder-arch-args.sh
install -D -t ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps buildElectron/io.github.mrmyhuang.cbetar2.png
install -D -t ${FLATPAK_DEST}/share/applications buildElectron/io.github.mrmyhuang.cbetar2.desktop
install -Dm644 -t ${FLATPAK_DEST}/share/metainfo buildElectron/io.github.mrmyhuang.cbetar2.metainfo.xml
npm run dist-flatpak -- $ELECTRON_BUILDER_ARCH_ARGS
# Bundle app and dependencies
- cp -a dist/linux*unpacked /app/main