forked from flathub/org.standardnotes.standardnotes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorg.standardnotes.standardnotes.yml
122 lines (116 loc) · 4.32 KB
/
org.standardnotes.standardnotes.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
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
app-id: org.standardnotes.standardnotes
branch: stable
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.node16
# Electron doesn't use a traditional locale format so separate-locales is useless.
separate-locales: false
command: start-standardnotes
finish-args:
- --device=dri
- --filesystem=xdg-download
- --filesystem=xdg-documents
- --filesystem=xdg-run/keyring
- --share=ipc
- --share=network
# Wayland support is blocked by https://github.com/electron/electron/issues/33161
- --socket=x11
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.freedesktop.secrets
- --persist=Standard Notes Backups
modules:
- shared-modules/libsecret/libsecret.json
- name: standardnotes
buildsystem: simple
build-options:
# Add the node bin directory.
append-path: /usr/lib/sdk/node16/bin:/app/yarn/bin:/run/build/standardnotes/flatpak-node/chromedrive
env:
# Don't add ELECTRON_CACHE
XDG_CACHE_HOME: /run/build/standardnotes/flatpak-node/cache
npm_config_nodedir: /usr/lib/sdk/node16
npm_config_loglevel: verbose
# https://stackoverflow.com/questions/25146976/can-i-get-npm-gyp-to-use-ccache
CXX: ccache g++
CC: ccache gcc
arch:
# https://github.com/sass/node-sass/issues/3033#issuecomment-763180778
# The architecture of Electron, see https://electronjs.org/docs/tutorial/support#supported-platforms
# for supported architectures.
i386:
env:
npm_config_arch: ia32
npm_config_target_arch: ia32
x86_64:
env:
npm_config_arch: x64
npm_config_target_arch: x64
arm:
env:
npm_config_arch: armv7l
npm_config_target_arch: armv7l
aarch64:
env:
npm_config_arch: arm64
npm_config_target_arch: arm64
build-commands:
# https://github.com/flatpak/flatpak-builder-tools/pull/252
- $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn2-setup.sh
# Translated from yarn setup
- yarn install --immutable
# From github workflows/desktop.release.reuse.yml
- |
. flatpak-node/electron-builder-arch-args.sh
cd packages/desktop
yarn build:desktop
yarn run webpack --config desktop.webpack.prod.js
yarn run electron-builder $ELECTRON_BUILDER_ARCH_ARGS --linux -c.linux.target=dir \
--publish=never --c.extraMetadata.version=$(node -p "require('./package.json').version")
- |
cd packages/desktop
rm dist/linux*-unpacked/chrome-sandbox
cp -r dist/linux*-unpacked /app/standardnotes
for size in 256 512; do
[[ -e "app/icon/Icon-${size}x${size}.png" ]] && \
install -Dm644 "app/icon/Icon-${size}x${size}.png" "/app/share/icons/hicolor/${size}x${size}/apps/${FLATPAK_ID}.png";
done
sources:
- type: git
url: https://github.com/standardnotes/app.git
commit: 6f7dfaa9f690eb2ca1be46c08d3b455e9d435e20
x-checker-data:
type: anitya
project-id: 146681
tag-template: '@standardnotes/desktop@$version'
stable-only: true
# Add the flatpak-node-generator generated sources.
# Note to generate recursively with -r since the repo is composed by submodules
# No need to generate a separate one for ./app
tag: '@standardnotes/[email protected]'
- generated-sources.json
- name: start-script
buildsystem: simple
build-commands:
# Install the wrapper script to start it.
- install -Dm 755 start-standardnotes.sh /app/bin/start-standardnotes
sources:
- type: file
path: start-standardnotes.sh
- name: metainfo
buildsystem: simple
build-commands:
- install -Dm644 org.standardnotes.standardnotes.metainfo.xml /app/share/metainfo/$FLATPAK_ID.metainfo.xml
sources:
- type: file
path: org.standardnotes.standardnotes.metainfo.xml
- name: desktop-entry
buildsystem: simple
build-commands:
- install -Dm644 org.standardnotes.standardnotes.desktop /app/share/applications/$FLATPAK_ID.desktop
sources:
- type: file
path: org.standardnotes.standardnotes.desktop