Files
komp_ac/packaging/flatpak/com.kompac.client.yml
2026-09-02 21:27:54 +02:00

143 lines
5.0 KiB
YAML

id: com.kompac.client
branch: stable
runtime: org.gnome.Platform
runtime-version: "50"
sdk: org.gnome.Sdk
command: komp-ac
sdk-extensions:
- org.freedesktop.Sdk.Extension.node22
- org.freedesktop.Sdk.Extension.rust-stable
finish-args:
- --share=ipc
- --share=network
- --socket=wayland
- --socket=fallback-x11
- --device=dri
- --env=GTK_USE_PORTAL=1
- --talk-name=org.a11y.Bus
build-options:
append-path: /usr/lib/sdk/node22/bin:/usr/lib/sdk/rust-stable/bin
modules:
- name: komp-ac
buildsystem: simple
build-options:
strip: true
no-debuginfo: true
build-args:
- --share=network
env:
HOME: /run/build/komp-ac
CARGO_HOME: /run/build/komp-ac/cargo-home
CARGO_TARGET_DIR: /run/build/komp-ac/target/server
COREPACK_HOME: /run/build/komp-ac/corepack
POSTGRESQL_VERSION: "=17.10.0"
PROTOC: /app/bin/protoc
PROTOC_INCLUDE: /app/include
RUSTFLAGS: ""
SQLX_OFFLINE: "true"
YARN_CACHE_FOLDER: /run/build/komp-ac/yarn-cache
sources:
- type: dir
path: ../..
skip:
- .git
- .agents
- .codex
- .codex-scheduled
- .direnv
- .env
- .env.*
- .env_*
- .envrc
- .idea
- .vscode
- "*.log"
- target
- "*/target"
- node_modules
- "*/node_modules"
- client-gui2/dist
- client-gui2/dist-ssr
- client-gui2/coverage
- client-gui2/.vite
- debian-dist
- flatpak-dist
- result
- result-*
- tantivy_indexes
- "*/tantivy_indexes"
- dumps
- "*/dumps"
- .postgres-data
- "*/.postgres-data"
- benchmark-results
- "*/benchmark-results"
- testing
- run_bins
- corporate_erp
- type: archive
url: https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip
sha256: 3a4c1e5f2516c639d3079b1586e703fc7bcfa2136d58bda24d1d54f949c315e8
dest: protoc-source
- type: file
url: https://github.com/theseus-rs/postgresql-binaries/releases/download/17.10.0/postgresql-17.10.0-x86_64-unknown-linux-gnu.tar.gz
sha256: 333937dac26a33d367810b0db20892bbca6cf244f670e26f54f3e0b57dcb50b6
dest: postgresql-cache
dest-filename: postgresql-17.10.0-x86_64-unknown-linux-gnu.tar.gz
- type: archive
url: https://github.com/typst/typst/releases/download/v0.13.1/typst-x86_64-unknown-linux-musl.tar.xz
sha256: 7d214bfeffc2e585dc422d1a09d2b144969421281e8c7f5d784b65fc69b5673f
dest: typst-source
build-commands:
- install -Dm755 protoc-source/protoc /app/bin/protoc
- install -d /app/include
- cp -a protoc-source/google /app/include/
- mkdir -p "$HOME/.theseus/postgresql"
- cp postgresql-cache/postgresql-17.10.0-x86_64-unknown-linux-gnu.tar.gz "$HOME/.theseus/postgresql/"
- cargo build --locked --release --package server --features full-embed
- cd client-gui2 && corepack yarn install --frozen-lockfile --non-interactive
- cd client-gui2 && CARGO_TARGET_DIR=/run/build/komp-ac/target/gui corepack yarn tauri build --no-bundle --features full-embed
- install -Dm755 /run/build/komp-ac/target/server/release/server /app/bin/komp-ac-server
- install -Dm755 /run/build/komp-ac/target/gui/release/client-gui2 /app/bin/client-gui2
- install -Dm755 packaging/flatpak/launcher.sh /app/bin/komp-ac
- install -Dm755 typst-source/typst /app/bin/typst
- install -d /app/lib/komp_ac/themes
- cp -a client/runtime/themes/. /app/lib/komp_ac/themes/
- install -Dm644 packaging/flatpak/com.kompac.client.desktop /app/share/applications/com.kompac.client.desktop
- install -Dm644 packaging/flatpak/com.kompac.client.metainfo.xml /app/share/metainfo/com.kompac.client.metainfo.xml
- install -Dm644 client-gui2/src-tauri/icons/32x32.png /app/share/icons/hicolor/32x32/apps/com.kompac.client.png
- install -Dm644 client-gui2/src-tauri/icons/128x128.png /app/share/icons/hicolor/128x128/apps/com.kompac.client.png
- install -Dm644 client-gui2/src-tauri/icons/128x128@2x.png /app/share/icons/hicolor/256x256/apps/com.kompac.client.png
cleanup:
- /bin/protoc
- /include
- name: libxml2-compat
buildsystem: autotools
config-opts:
- --without-icu
- --without-lzma
- --without-python
- --without-readline
sources:
- type: archive
url: https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.9.tar.xz
sha256: a2c9ae7b770da34860050c309f903221c67830c86e4a7e760692b803df95143a
post-install:
- install -Dm644 Copyright /app/share/licenses/libxml2/Copyright
cleanup:
- /bin
- /include
- /lib/cmake
- /lib/libxml2.a
- /lib/libxml2.la
- /lib/libxml2.so
- /lib/pkgconfig
- /share/aclocal
- /share/doc
- /share/man