mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-10 10:29:55 -06:00
- brand.toml is the only place the product name lives; every crate and app
reads it through dac-brand (env vars with legacy fallback, settings folder
with copy-only migration, default library, preset extensions, i18n {app})
- cargo xtask brand check|test, run|install|package, docs, rename-crates,
deny and immich; packaging files are templates rendered from brand.toml
- icons regenerated from brand/icon.svg; upstream branding removed
- MIT licence (segment and fetch stay Apache-2.0); cargo deny licence policy
- clean-room rules in AGENTS.md/CLAUDE.md; docs/upstream-merge.md
- plan/ rebuilt and committed; parity tracker reopens Classic rows, adds
PLAN.md section 2 rows and the IMM Immich section; plan/immich.md and a
pinned Immich test server
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
77 lines
3.5 KiB
Plaintext
77 lines
3.5 KiB
Plaintext
# Flatpak manifest for {{display_name}}, ready for a Flathub submission. A template: `cargo xtask package`
|
|
# renders it, with the desktop entry, MIME type and metainfo it installs, into target/package/linux/.
|
|
#
|
|
# Flatpak builds run offline, so the crate sources must be vendored first. From the repo root:
|
|
#
|
|
# cargo xtask package --render-only
|
|
# curl -fsSLO https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/cargo/flatpak-cargo-generator.py
|
|
# python3 flatpak-cargo-generator.py Cargo.lock -o target/package/linux/flatpak/cargo-sources.json
|
|
# flatpak-builder --user --install --force-clean build-flatpak target/package/linux/flatpak/{{app_id}}.yml
|
|
# flatpak run {{app_id}}
|
|
#
|
|
# For Flathub, replace the workspace `dir` source with a `git` source pinned to a release tag and commit.
|
|
#
|
|
# {app_id}.bundle.yml.in (same directory) builds the .flatpak attached to every
|
|
# release from the prebuilt binaries. Keep runtime-version and finish-args identical in both
|
|
# (packaging-lint checks this).
|
|
id: {{app_id}}
|
|
runtime: org.freedesktop.Platform
|
|
runtime-version: '25.08'
|
|
sdk: org.freedesktop.Sdk
|
|
sdk-extensions:
|
|
- org.freedesktop.Sdk.Extension.rust-stable
|
|
command: {{binary}}
|
|
finish-args:
|
|
# Display: Wayland first; X11 only when no Wayland compositor is running.
|
|
- --socket=wayland
|
|
- --socket=fallback-x11
|
|
# X11 shared memory (MIT-SHM). Without it the X11 fallback is slow or fails.
|
|
- --share=ipc
|
|
# GPU access for the wgpu renderer (Vulkan, or GL as a fallback).
|
|
- --device=dri
|
|
# The library lives in ~/Pictures/{{library_default}} by default, and imports usually come from
|
|
# Pictures. Open/Save dialogs go through the file-chooser portal (rfd's xdg-portal backend) and
|
|
# drag-and-drop through the document portal, so picked folders elsewhere work without broad
|
|
# filesystem access.
|
|
- --filesystem=xdg-pictures
|
|
# Deliberately not granted: home/host filesystem access, and network. The network is only for
|
|
# the optional SAM 3 model download (AI Object/Describe masks, docs/ai-masks.md); without it
|
|
# that download fails with an error and everything else works. Users who want it run
|
|
# `flatpak override --user --share=network {{app_id}}`.
|
|
build-options:
|
|
append-path: /usr/lib/sdk/rust-stable/bin
|
|
modules:
|
|
- name: {{binary}}
|
|
buildsystem: simple
|
|
build-options:
|
|
env:
|
|
CARGO_HOME: /run/build/{{binary}}/cargo
|
|
CARGO_NET_OFFLINE: 'true'
|
|
build-commands:
|
|
- cargo --offline build --release --locked -p dac-app -p dac-cli
|
|
- install -Dm755 target/release/app /app/bin/{{binary}}
|
|
- install -Dm755 target/release/app-cli /app/bin/{{cli_binary}}
|
|
- install -Dm644 rendered/{{app_id}}.desktop /app/share/applications/{{app_id}}.desktop
|
|
- install -Dm644 rendered/{{app_id}}.mime.xml /app/share/mime/packages/{{app_id}}.xml
|
|
- install -Dm644 rendered/{{app_id}}.metainfo.xml /app/share/metainfo/{{app_id}}.metainfo.xml
|
|
- >-
|
|
for f in assets/app-icon/hicolor/*/apps/*; do
|
|
size=$(basename "$(dirname "$(dirname "$f")")");
|
|
install -Dm644 "$f" "/app/share/icons/hicolor/$size/apps/{{app_id}}.${f##*.}";
|
|
done
|
|
sources:
|
|
# the workspace (this file is rendered to target/package/linux/flatpak/)
|
|
- type: dir
|
|
path: ../../../..
|
|
skip:
|
|
- target
|
|
- dist
|
|
- corpus
|
|
- build-flatpak
|
|
- .flatpak-builder
|
|
# the rendered desktop entry, MIME type and metainfo (version and date filled in)
|
|
- type: dir
|
|
path: ..
|
|
dest: rendered
|
|
- cargo-sources.json
|