diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | build-aux/flatpak/cargo-sources.json (renamed from build-aux/cargo-sources.json) | 0 | ||||
| -rw-r--r-- | build-aux/flatpak/systems.tranquil.Map.yml | 27 | ||||
| -rw-r--r-- | build-aux/systems.tranquil.Map.yml | 39 | ||||
| -rw-r--r-- | meson.build | 17 |
5 files changed, 36 insertions, 49 deletions
@@ -4,6 +4,8 @@ *.mo builddir _build +dist +src/info.rs .flatpak-builder ./*.minisig *.minisig diff --git a/build-aux/cargo-sources.json b/build-aux/flatpak/cargo-sources.json index 39d6702..39d6702 100644 --- a/build-aux/cargo-sources.json +++ b/build-aux/flatpak/cargo-sources.json diff --git a/build-aux/flatpak/systems.tranquil.Map.yml b/build-aux/flatpak/systems.tranquil.Map.yml new file mode 100644 index 0000000..5d733b1 --- /dev/null +++ b/build-aux/flatpak/systems.tranquil.Map.yml @@ -0,0 +1,27 @@ +id: systems.tranquil.Map +runtime: org.gnome.Platform +runtime-version: '50' +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: meson + build-options: + append-path: /usr/lib/sdk/rust-stable/bin + env: + CARGO_NET_OFFLINE: 'true' + sources: + - type: dir + path: ../.. + - cargo-sources.json + - type: shell + commands: + - mkdir -p .cargo + - cp -vf cargo/config .cargo/config.toml diff --git a/build-aux/systems.tranquil.Map.yml b/build-aux/systems.tranquil.Map.yml deleted file mode 100644 index ed5642e..0000000 --- a/build-aux/systems.tranquil.Map.yml +++ /dev/null @@ -1,39 +0,0 @@ -id: systems.tranquil.Map -runtime: org.gnome.Platform -runtime-version: '50' -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 diff --git a/meson.build b/meson.build index 1236895..b5c972c 100644 --- a/meson.build +++ b/meson.build @@ -1,8 +1,6 @@ ################################################################################ # Project Settings ################################################################################ -# TODO: Consider whether I need to add version and license or if meson is smart -# enough to read that from Cargo.toml. project('map', 'rust', version: '1.0.4', meson_version: '>= 1.0.0') base_id = 'systems.tranquil.Map' @@ -18,11 +16,11 @@ rust = import('rust') # Dependencies ################################################################################ -dependency('glib-2.0', version: '>= 2.86.0') -dependency('gio-2.0', version: '>= 2.86.0') -dependency('gtk4', version: '>= 4.20.3') -dependency('libadwaita-1', version: '>= 1.8.4') -dependency('gtksourceview-5', version: '>= 5.18.0') +dependency('glib-2.0', version: '>= 2.84.0') +dependency('gio-2.0', version: '>= 2.84.0') +dependency('gtk4', version: '>= 4.18.0') +dependency('libadwaita-1', version: '>= 1.7.0') +dependency('gtksourceview-5', version: '>= 5.16.0') ################################################################################ # Required Programs @@ -30,8 +28,8 @@ dependency('gtksourceview-5', version: '>= 5.18.0') find_program('cargo') find_program('glib-compile-resources') find_program('glib-compile-schemas') -desktop_file_validate = find_program('desktop-file-validate') -appstream_util = find_program('appstream-util') +desktop_file_validate = find_program('desktop-file-validate', required: false) +appstream_util = find_program('appstream-util', required: false) cargo = find_program('cargo') ################################################################################ @@ -90,6 +88,5 @@ summary({ gnome.post_install( gtk_update_icon_cache: true, - glib_compile_schemas: true, update_desktop_database: true, ) |