-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathnet.veloren.veloren.yaml
80 lines (75 loc) · 2.85 KB
/
net.veloren.veloren.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
app-id: net.veloren.veloren
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
command: veloren-voxygen
finish-args:
- --device=all
- --filesystem=xdg-pictures/veloren:create
- --share=ipc
- --share=network
- --socket=fallback-x11
- --socket=pulseaudio
- --socket=wayland
modules:
- name: rust-nightly
build-options:
no-debuginfo: true
buildsystem: simple
build-commands:
- ./install.sh --prefix=/app --disable-ldconfig --verbose
cleanup:
- '*'
sources:
- type: archive
only-arches: [x86_64]
url: https://static.rust-lang.org/dist/2023-04-20/rust-nightly-x86_64-unknown-linux-gnu.tar.xz
sha256: 2fc97fc314b207e42ad2951a1a7a5c8740b981e253987ee2066d6c4bd30aa104
- type: archive
only-arches: [aarch64]
url: https://static.rust-lang.org/dist/2023-04-20/rust-nightly-aarch64-unknown-linux-gnu.tar.xz
sha256: c82a0c4551513dd921d73b711166d0e999ad49e4b59ba090798855e724d75ae7
- name: veloren
build-options:
env:
RUSTFLAGS: --remap-path-prefix =../
CARGO_HOME: /run/build/veloren/cargo
VELOREN_USERDATA_STRATEGY: system
buildsystem: simple
build-commands:
# Unoptimize dev/debug builds to speed up build process
# * Purpose of this to test local builds. Comment for Flathub build.
#- sed -i 's/opt-level = 3/opt-level = 0/' Cargo.toml
#- sed -i 's/opt-level = 2/opt-level = 0/g' Cargo.toml
- cargo --offline fetch --manifest-path Cargo.toml
- cargo --offline build --release --no-default-features --features="default-publish"
- install -D -m 755 ./target/release/veloren-{voxygen,server-cli} -t /app/bin/
post-install:
# Install assets
- mkdir -p /app/share/veloren/
- cp -ap assets/ /app/share/veloren/
# Install desktop file, icon and AppData manifest
- install -Dpm0644 assets/voxygen/${FLATPAK_ID}.metainfo.xml -t /app/share/metainfo/
- install -Dpm0644 assets/voxygen/${FLATPAK_ID}.desktop -t /app/share/applications/
- install -Dpm0644 assets/voxygen/${FLATPAK_ID}.png -t /app/share/icons/hicolor/256x256/apps/
# Automatically add build version and date into AppData
- |
set -e
VERSION=0.15.0-$(git describe --tags --always | sed 's/^[vV]//')
DATE=$(date -d @$(git show -s --format=%ct) +'%Y-%m-%d')
sed \
-e "s/@VERSION@/${VERSION}/g" \
-e "s/@DATE@/${DATE}/g" \
-i /app/share/metainfo/${FLATPAK_ID}.metainfo.xml
sources:
- type: git
url: https://gitlab.com/veloren/veloren.git
commit: 59e242dfb84ead32871dddeb7b8ab1baf6792202
tag: nightly
# LLVM ERROR: out of memory on ARM
- type: shell
only-arches:
- arm
commands:
- sed -i "/lto = true/d" Cargo.toml
- generated-sources.json