-
Notifications
You must be signed in to change notification settings - Fork 12
/
com.logseq.Logseq.yml
130 lines (130 loc) · 5.52 KB
/
com.logseq.Logseq.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
123
124
125
126
127
128
129
130
id: com.logseq.Logseq
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.node18
- org.freedesktop.Sdk.Extension.openjdk11
# Electron doesn't use a traditional locale format
separate-locales: false
writable-sdk: true
command: run.sh
finish-args:
- --device=dri
- --share=ipc
- --socket=x11
- --socket=wayland
- --socket=pulseaudio
- --share=network
- --filesystem=home
# for using ssh for remote graph
- --socket=ssh-auth
- --env=SSH_ASKPASS=/app/libexec/openssh/ssh-askpass
# required to fix cursor scaling on wayland, especially with fractional scaling
- --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons
- --persist=~/.ssh
modules:
- 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: logseq
buildsystem: simple
build-options:
append-path: /usr/lib/sdk/node18/bin:/usr/lib/sdk/openjdk11/bin
env:
HOME: /run/build/logseq
_JAVA_OPTIONS: -Duser.home=/run/build/logseq
XDG_CACHE_HOME: /run/build/logseq/flatpak-node/cache
DUGITE_CACHE_DIR: /run/build/logseq/flatpak-node/tmp
NPM_CONFIG_LOGLEVEL: info
npm_config_nodedir: /run/build/logseq/flatpak-node/cache/node-gyp/27.1.3
npm_config_cache: /run/build/logseq/flatpak-node/npm-cache
npm_config_offline: 'true'
ENABLE_PLUGINS: 'true'
ENABLE_FILE_SYNC_PRODUCTION: 'true'
sources:
- type: file
url: https://download.clojure.org/install/linux-install-1.11.1.1413.sh
sha256: ad9aa1e99c59a4f7eb66450914fbec543337d9fada60dd9d34eec7fe18ae4965
- type: file
url: https://download.clojure.org/install/clojure-tools-1.11.1.1413.tar.gz
sha256: 93c3a5a3adca51c5858063419abf66c83dbf24ea15e1fd92f79bf7e662381fe0
- type: file
url: https://github.com/WiseLibs/better-sqlite3/releases/download/v8.0.1/better-sqlite3-v8.0.1-node-v108-linux-x64.tar.gz
sha256: c93da6df11365f41940525ba245f09f927b124c7bf8b0d1c39b83b1352e52c4c
dest: flatpak-node/npm-cache/_prebuilds
dest-filename: c99219-better-sqlite3-v8.0.1-node-v108-linux-x64.tar.gz
- type: file
url: https://github.com/WiseLibs/better-sqlite3/releases/download/v8.0.1/better-sqlite3-v8.0.1-node-v108-linux-arm64.tar.gz
sha256: 1721ca523b44424adb8edc31ad3a20e4c720bdfc452826e7095dc18ba61e2b62
dest: flatpak-node/npm-cache/_prebuilds
dest-filename: c99219-better-sqlite3-v8.0.1-node-v108-linux-arm64.tar.gz
- type: git
url: https://github.com/logseq/cljs-time
commit: 5704fbf48d3478eedcf24d458c8964b3c2fd59a9
dest: libs/cljs-time
- type: file
path: com.logseq.Logseq.desktop
- type: file
path: com.logseq.Logseq.svg
- type: file
path: com.logseq.Logseq.metainfo.xml
- type: script
dest-filename: run.sh
commands:
- zypak-wrapper.sh /app/logseq/Logseq "$@"
- type: archive
url: https://github.com/logseq/logseq/archive/refs/tags/0.10.9.tar.gz
sha256: 9fe98bbeb4355c1ad3ea5b3776f02455ee86b8157f74dd53bb9b3367df31403a
dest: logseq
x-checker-data:
type: anitya
project-id: 291486
url-template: https://github.com/logseq/logseq/archive/refs/tags/$version.tar.gz
- type: file
path: static/yarn.lock
dest: logseq/resources
- generated-sources.json
- maven-sources.json
build-commands:
# setup clojure
- sed -i 's/curl/#curl/' linux-install-1.11.1.1413.sh
- chmod +x linux-install-1.11.1.1413.sh
- ./linux-install-1.11.1.1413.sh
# disable clojure tools online fetching
- unzip /usr/local/lib/clojure/libexec/clojure-tools-1.11.1.1413.jar clojure/tools/gitlibs/impl.clj
- sed -i 's/git-fetch git-dir/do/' clojure/tools/gitlibs/impl.clj
- zip -u /usr/local/lib/clojure/libexec/clojure-tools-1.11.1.1413.jar clojure/tools/gitlibs/impl.clj
# setup offline cache
- git clone --bare libs/cljs-time .gitlibs/_repos/https/github.com/logseq/cljs-time
- ln -s $XDG_CACHE_HOME/node-gyp $HOME/.electron-gyp
- yarn --offline config set yarn-offline-mirror $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn-mirror
# compile cljs
- yarn --cwd logseq --offline install --immutable --immutable-cache --inline-builds
- yarn --cwd logseq --offline gulp:build
- yarn --cwd logseq --offline cljs:release-electron
# build linux
- yarn --cwd logseq/static --offline install --immutable --immutable-cache --inline-builds
- yarn --cwd logseq/static --offline electron-forge package
# install
- cp -a logseq/static/out/Logseq-linux-* /app/logseq
- install -Dm644 -t /app/share/icons/hicolor/scalable/apps/ com.logseq.Logseq.svg
- install -Dm644 -t /app/share/applications com.logseq.Logseq.desktop
- install -Dm644 -t /app/share/metainfo com.logseq.Logseq.metainfo.xml
- install -Dm755 -t /app/bin/ run.sh
cleanup:
- /logseq/resources/app/node_modules/better-sqlite3/build/Release/obj.target
- /logseq/resources/app/node_modules/better-sqlite3/build/Release/obj
- /logseq/resources/app/node_modules/better-sqlite3/build/Release/sqlite3.a
- '*.js.map'