aboutsummaryrefslogtreecommitdiff
path: root/build-aux/systems.tranquil.Map.yml
blob: a44a3e4004049fb8219d8d42a7302bafdd17c45f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
id: systems.tranquil.Map
runtime: org.gnome.Platform
runtime-version: '49'
sdk: org.gnome.Sdk
sdk-extensions:
  - org.freedesktop.Sdk.Extension.rust-stable
command: map
finish-args:
  - --device=dri
  - --share=ipc
  - --socket=wayland
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