id: systems.tranquil.Map runtime: org.gnome.Platform runtime-version: '48' sdk: org.gnome.Sdk sdk-extensions: - org.freedesktop.Sdk.Extension.rust-stable command: map finish-args: - --device=dri - --share=ipc - --socket=wayland - --socket=fallback-x11 modules: - name: map buildsystem: simple build-options: append-path: /usr/lib/sdk/rust-stable/bin env: CARGO_HOME: /run/build/map/cargo CARGO_NET_OFFLINE: 'true' build-commands: - cargo --offline fetch --manifest-path Cargo.toml --verbose - cargo build --offline --release --all-features - install -Dm0755 target/release/map ${FLATPAK_DEST}/bin/map - install -Dm0644 resources/logo.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg - install -Dm0644 resources/${FLATPAK_ID}.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop - install -Dm0644 resources/${FLATPAK_ID}.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml - install -Dm0644 resources/${FLATPAK_ID}.service ${FLATPAK_DEST}/share/dbus-1/services/${FLATPAK_ID}.service - install -Dm0644 resources/wmap.lang ${FLATPAK_DEST}/share/gtksourceview-5/language-specs/wmap.lang - | for po_file in po/*.po; do locale=$(basename "$po_file" .po) mkdir -p ${FLATPAK_DEST}/share/locale/${locale}/LC_MESSAGES msgfmt "$po_file" -o ${FLATPAK_DEST}/share/locale/${locale}/LC_MESSAGES/${FLATPAK_ID}.mo done sources: - type: dir path: .. - cargo-sources.json