- Generate cargo checksum files for vendored sources - Add checksums.json for build-time checksum creation - Update runtime to GNOME 49 for Rust 1.93+ support - Fix archive-type to tar-gzip for flatpak-builder Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
63 lines
2 KiB
YAML
63 lines
2 KiB
YAML
app-id: org.nextbike.NextCompanion
|
|
runtime: org.gnome.Platform
|
|
runtime-version: '49'
|
|
sdk: org.gnome.Sdk
|
|
sdk-extensions:
|
|
- org.freedesktop.Sdk.Extension.rust-stable
|
|
command: next-companion
|
|
|
|
finish-args:
|
|
- --share=network # nextbike API calls
|
|
- --share=ipc
|
|
- --socket=wayland
|
|
- --socket=fallback-x11
|
|
- --device=dri # GPU acceleration
|
|
|
|
build-options:
|
|
append-path: /usr/lib/sdk/rust-stable/bin
|
|
env:
|
|
CARGO_HOME: /run/build/next-companion/cargo-home
|
|
RUST_BACKTRACE: '1'
|
|
arch:
|
|
aarch64:
|
|
env:
|
|
CARGO_BUILD_TARGET: aarch64-unknown-linux-gnu
|
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-unknown-linux-gnu-gcc
|
|
|
|
modules:
|
|
- name: next-companion
|
|
buildsystem: simple
|
|
build-commands:
|
|
- mkdir -p .cargo
|
|
- cp cargo-vendor-config/cargo-vendor-config.toml .cargo/config.toml
|
|
- |
|
|
python3 -c "
|
|
import json
|
|
with open('cargo-checksums/checksums.json') as f:
|
|
checksums = json.load(f)
|
|
for name, checksum in checksums.items():
|
|
path = f'cargo-vendor/{name}/.cargo-checksum.json'
|
|
with open(path, 'w') as f:
|
|
json.dump({'files': {}, 'package': checksum}, f)
|
|
"
|
|
- cargo --offline build --release
|
|
- |
|
|
install -Dm755 \
|
|
"target/${CARGO_BUILD_TARGET:+${CARGO_BUILD_TARGET}/}release/next-companion" \
|
|
/app/bin/next-companion
|
|
- install -Dm644 data/icons/org.nextbike.NextCompanion.png
|
|
/app/share/icons/hicolor/512x512/apps/org.nextbike.NextCompanion.png
|
|
- install -Dm644 data/org.nextbike.NextCompanion.desktop
|
|
/app/share/applications/org.nextbike.NextCompanion.desktop
|
|
sources:
|
|
- type: dir
|
|
path: .
|
|
- type: file
|
|
path: build-aux/cargo-vendor-config.toml
|
|
dest: cargo-vendor-config
|
|
dest-filename: cargo-vendor-config.toml
|
|
- type: file
|
|
path: build-aux/cargo-sources-checksums.json
|
|
dest: cargo-checksums
|
|
dest-filename: checksums.json
|
|
- build-aux/cargo-sources.json
|