forked from flathub/com.logseq.Logseq
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcom.logseq.Logseq.yml
101 lines (101 loc) · 4.04 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
id: com.logseq.Logseq
runtime: org.freedesktop.Platform
runtime-version: '22.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '22.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
modules:
- 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_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.10.1.763.sh
sha256: 91421551872d421915c4a598741aefcc6749d3f4aafca9c08f271958e5456e2c
- type: file
url: https://download.clojure.org/install/clojure-tools-1.10.1.763.tar.gz
sha256: 2a3ec8a6c3639035c2bba10945ae9007ab0dc9136766b95d2161f354e62a4d10
- 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.9.15.tar.gz
sha256: c9a3d352483ee0f4f95c8397c752c7830f7b7c2cade5bfba29a3254191b8c4bf
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.10.1.763.sh
- chmod +x linux-install-1.10.1.763.sh
- ./linux-install-1.10.1.763.sh
# disable clojure tools online fetching
- unzip /usr/local/lib/clojure/libexec/clojure-tools-1.10.1.763.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.10.1.763.jar clojure/tools/gitlibs/impl.clj
# setup offline cache
- git clone --bare libs/cljs-time .gitlibs/_repos/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
- yarn --cwd logseq --offline gulp:build
- yarn --cwd logseq --offline cljs:release-electron
# build linux
- yarn --cwd logseq/static --offline install
- 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'