OpenBangla-Keyboard
OpenBangla-Keyboard copied to clipboard
Flatpak manifest: OpenBangla addon for Fcitx5
I am experimenting with flatpak manifest for working Fcitx5 addon. Build is failing. Requesting people to look at it. Here are official fcitx5 examples
org.fcitx.Fcitx5.Addon.OpenBangla.yaml
app-id: org.fcitx.Fcitx5.Addon.OpenBangla
branch: master
runtime: org.fcitx.Fcitx5
runtime-version: stable
sdk: org.kde.Sdk//5.15-24.08
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
build-extension: true
separate-locales: false
cleanup:
- /bin
- /include
- /lib/pkgconfig
- /share/pkgconfig
- '*.la'
build-options:
prefix: /app/addons/OpenBangla
prepend-path: /app/addons/OpenBangla/bin
prepend-pkg-config-path: /app/addons/OpenBangla/lib/pkgconfig
append-path: /usr/lib/sdk/rust-stable/bin
build-args:
- --share=network
modules:
# Add the Rust library module
- name: riti
buildsystem: simple
build-options:
prepend-ld-library-path: /app/addons/OpenBangla/lib
env:
CARGO_HOME: /run/build/riti/cargo
build-commands:
- cargo --offline --frozen fetch --manifest-path Cargo.toml
- cargo --offline --frozen build --release
- install -Dm755 target/release/libriti.a /app/addons/OpenBangla/lib/liblibriti.a
- install -Dm755 target/release/libriti.d /app/addons/OpenBangla/lib/liblibriti.d
sources:
- ./generated-sources.json # generate cargo source: https://github.com/flatpak/flatpak-builder-tools/tree/master/cargo#usage
- type: dir
path: .
- type: git
url: https://github.com/OpenBangla/riti.git
commit: 0d11ba0136261f7a26e4d8879345d7b6e757edd5
# Add the main application module
- name: fcitx5-openbangla
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DENABLE_FCITX=ON
builddir: true
sources:
- type: git
url: https://github.com/OpenBangla/OpenBangla-Keyboard.git
tag: develop
build-commands:
- cmake .. -GNinja
- ninja install -v
Could you please give a screenshot of build failure?
@asifakonjee i dont have the build log but it failed because it was trying to pull riti library. Flatpak builder doesn't support network during build process. OpenBangla needs to modify to use the local build of riti library that was pulled from yml file
@tazihad... Does adding this changes anything? sources: - type: git url: https://github.com/OpenBangla/OpenBangla-Keyboard.git tag: develop recursive-submodules: true
In the manual build process, there is git submodule update - that's why suggested.
I am not a coder or programmer, just an enthusiast. Please pardon my mistakes.
@asifakonjee I put together everthing here.
It installs perfectly. But won't show up in fcitx flatpak. Because official fcitx5 flatpak is built on top of sdk: org.kde.Sdk//6.8. I built the openbangla flatpak on top of sdk: org.kde.Sdk//5.15-24.08. it's because as of now openbangla is built using qt5. So, it won't work for qt6.
@tazihad vendored-tarball.sh creates a tarball with all the dependencies in place, so no network connection will be needed.
Actually it runs the cargo vendor vendor command to download the dependencies of the riti library and creates a src/engine/riti/config.toml:
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
To instruct the build process to use the downloaded sources and not use the internet.
@tazihad... But if that is the case then it shouldn't run in if manually build in kde 6, but it runs perfectly.
@asifakonjee I got a build with no error. But it won't show up on fctix5 config menu. I think the reason is Openbangla is build on QT5 and fctix is build on qt6(KDE6 runtime). I get error if i use KDE6 runtime. So, this manifest would probably work if OpenBangla is ported to QT6.
Please build and test on your machine and share the result
full manifest: https://github.com/tazihad/org.fcitx.Fcitx5.Addon.OpenBangla
@tazihad... Too much work for me. I am not an expert or even a user of flatpak. Thank you bro for your effort. Also please pardon my comments if it caused you any annoyanc. Thanks.