# Flatpak manifest of Pragma Chess, for Flathub (https://github.com/flathub/flathub). # Builds the desktop client from a release tag on the KDE Qt 6 runtime, with # the two libraries CMake would otherwise fetch (yaml-cpp, qrcodegen) as # modules, and the official Stockfish binary as the bundled engine, where # EngineCatalog::bundledEngineDirs looks for it (lib/pragma-chess/engines). # Phone Link is off: libdatachannel is not in the runtime. # # flatpak-builder --user --install --force-clean build-dir packaging/flatpak/io.github.francescobianco.PragmaChess.yml app-id: io.github.francescobianco.PragmaChess runtime: org.kde.Platform runtime-version: '6.9' sdk: org.kde.Sdk command: pragma-chess rename-desktop-file: false finish-args: - --share=ipc - --socket=fallback-x11 - --socket=wayland - --device=dri # lichess.org, chess.com, torneionline.com, the folder sync and online play. - --share=network # Databases, projects and books live in the user's chess folder (~/Chess/Pragma, # localized); ChessBase files and other engines are wherever the user keeps them. - --filesystem=home cleanup: - /include - /lib/cmake - /lib/pkgconfig - /share/doc - '*.a' modules: - name: yaml-cpp buildsystem: cmake-ninja config-opts: - -DCMAKE_BUILD_TYPE=Release - -DYAML_BUILD_SHARED_LIBS=OFF - -DYAML_CPP_BUILD_TESTS=OFF - -DYAML_CPP_BUILD_TOOLS=OFF - -DYAML_CPP_BUILD_CONTRIB=OFF sources: - type: archive url: https://github.com/jbeder/yaml-cpp/archive/refs/tags/0.8.0.tar.gz sha256: fbe74bbdcee21d656715688706da3c8becfd946d92cd44705cc6098bb23b3a16 - name: stockfish # Built like scripts/build-stockfish.sh does, pinned with packaging/stockfish.env: # the release's source with the small network only (packaging/stockfish/). buildsystem: simple build-commands: - make -C src -j $FLATPAK_BUILDER_N_JOBS all ARCH=x86-64-sse41-popcnt COMP=gcc EXTRALDFLAGS=-s - install -Dm755 src/stockfish /app/lib/pragma-chess/engines/stockfish - install -Dm644 Copying.txt /app/lib/pragma-chess/engines/Copying.txt - install -Dm644 AUTHORS /app/lib/pragma-chess/engines/AUTHORS - sed -e s/@VERSION@/18/g -e s/@TAG@/sf_18/g -e s/@NET@/nn-37f18f62d772.nnue/g README.txt.in > README.txt && install -Dm644 README.txt /app/lib/pragma-chess/engines/README.txt only-arches: - x86_64 sources: - type: archive url: https://github.com/official-stockfish/Stockfish/archive/refs/tags/sf_18.tar.gz sha256: 22a195567e3493e7c9ca8bf8fa2339f4ffc876384849ac8a417ff4b919607e7b - type: file url: https://github.com/official-stockfish/networks/raw/master/nn-37f18f62d772.nnue sha256: 37f18f62d772f3107e1d6aaca3898c130c3c86f2ab63e6555fbbca20635a899d dest: src - type: patch path: ../stockfish/small-net.patch - type: file path: ../stockfish/README.txt dest-filename: README.txt.in - name: pragma-chess buildsystem: cmake-ninja config-opts: - -DCMAKE_BUILD_TYPE=Release - -DPRAGMA_PHONE_LINK=OFF - -DFETCHCONTENT_FULLY_DISCONNECTED=ON sources: - type: git url: https://github.com/francescobianco/pragma-chess.git tag: v0.3.0