- Manifest: org.gnome.Platform 47, Rust SDK extension - Builds daemon, CLI, Uinputd, tray (optional) - Bundles xclip for clipboard operations - Compiles vietc-xrecord C helper - Entry: vietc-wrapper.sh (daemon + tray launcher) - Permissions: X11, Wayland, input devices, IPC - Makefile target: 'make flatpak'
105 lines
3.7 KiB
JSON
105 lines
3.7 KiB
JSON
{
|
|
"app-id": "io.github.vietc.VietPlus",
|
|
"runtime": "org.gnome.Platform",
|
|
"runtime-version": "47",
|
|
"sdk": "org.gnome.Sdk",
|
|
"sdk-extensions": [
|
|
"org.freedesktop.Sdk.Extension.rust-stable"
|
|
],
|
|
"command": "vietc-wrapper.sh",
|
|
"rename-desktop-file": "vietc.desktop",
|
|
"rename-icon": "vietc",
|
|
"finish-args": [
|
|
"--socket=x11",
|
|
"--socket=wayland",
|
|
"--device=input",
|
|
"--share=ipc",
|
|
"--env=XDG_CURRENT_DESKTOP=GNOME",
|
|
"--env=GTK_IM_MODULE=fcitx"
|
|
],
|
|
"modules": [
|
|
{
|
|
"name": "xclip",
|
|
"no-autogen": true,
|
|
"make-install-args": [
|
|
"install"
|
|
],
|
|
"builddir": true,
|
|
"sources": [
|
|
{
|
|
"type": "archive",
|
|
"url": "https://github.com/astrand/xclip/archive/refs/tags/0.13.tar.gz",
|
|
"sha256": "ca5b8804e3c910a66423a882d79bf3c9450e8758faa5d2b9deba5342451b140e"
|
|
}
|
|
],
|
|
"cleanup": [
|
|
"/share/man"
|
|
]
|
|
},
|
|
{
|
|
"name": "vietc",
|
|
"buildsystem": "simple",
|
|
"build-options": {
|
|
"append-path": "/usr/lib/sdk/rust-stable/bin",
|
|
"env": {
|
|
"CARGO_HOME": "/run/build/vietc/cargo"
|
|
}
|
|
},
|
|
"build-commands": [
|
|
"cargo build --release -p vietc-daemon -p vietc-cli -p vietc-uinputd --manifest-path /run/build/vietc/Cargo.toml",
|
|
|
|
"cd /run/build/vietc/ui && cargo build --release --manifest-path /run/build/vietc/ui/Cargo.toml || echo 'tray build skipped'",
|
|
|
|
"install -Dm755 target/release/vietc /app/bin/vietc",
|
|
"install -Dm755 target/release/vietc-cli /app/bin/vietc-cli",
|
|
"install -Dm755 target/release/vietc-uinputd /app/bin/vietc-uinputd",
|
|
"[ -f ui/target/release/vietc-tray ] && install -Dm755 ui/target/release/vietc-tray /app/bin/vietc-tray || true",
|
|
|
|
"gcc -O2 -o /app/bin/vietc-xrecord /run/build/vietc/packaging/appimage/vietc-xrecord.c -lX11 -lXtst",
|
|
|
|
"install -Dm755 /run/build/vietc/packaging/flatpak/vietc-wrapper.sh /app/bin/vietc-wrapper.sh",
|
|
|
|
"install -Dm644 /run/build/vietc/packaging/appimage/vietc.desktop /app/share/applications/vietc.desktop",
|
|
|
|
"install -Dm644 /run/build/vietc/vietc.toml /app/etc/vietc/config.toml",
|
|
|
|
"mkdir -p /app/share/icons/hicolor/256x256/apps",
|
|
"cp /run/build/vietc/packaging/appimage/AppDir/vietc.svg /app/share/icons/hicolor/256x256/apps/vietc.svg || true",
|
|
|
|
"install -Dm644 /run/build/vietc/vietc.service /app/lib/systemd/user/vietc.service || true",
|
|
|
|
"mkdir -p /app/share/metainfo",
|
|
"cat > /app/share/metainfo/io.github.vietc.VietPlus.metainfo.xml << 'XML'",
|
|
"<?xml version='1.0' encoding='utf-8'?>",
|
|
"<component type='desktop-application'>",
|
|
" <id>io.github.vietc.VietPlus</id>",
|
|
" <name>Viet+</name>",
|
|
" <summary>Vietnamese Input Method for Linux</summary>",
|
|
" <description>",
|
|
" <p>Zero-configuration Vietnamese input method engine supporting Telex and VNI input methods.</p>",
|
|
" </description>",
|
|
" <metadata_license>MIT</metadata_license>",
|
|
" <project_license>MIT</project_license>",
|
|
" <url type='homepage'>https://github.com/vndangkhoa/vietc</url>",
|
|
" <provides><binary>vietc</binary></provides>",
|
|
" <categories><category>Utility</category></categories>",
|
|
"</component>",
|
|
"XML",
|
|
|
|
"mkdir -p /app/share/doc/vietc",
|
|
"cp /run/build/vietc/README.md /app/share/doc/vietc/ || true",
|
|
"cp /run/build/vietc/LICENSE /app/share/doc/vietc/ || true"
|
|
],
|
|
"sources": [
|
|
{
|
|
"type": "dir",
|
|
"path": "../.."
|
|
}
|
|
],
|
|
"cleanup": [
|
|
"/app/share/doc",
|
|
"/app/share/icons"
|
|
]
|
|
}
|
|
]
|
|
}
|