# Flatpak manifest for GeoLibre Desktop (Flathub). # # This is a binary repackage of the official Tauri-built .deb, which is the # approach documented in Tauri's Flatpak guide: GTK3 and webkit2gtk-4.1 are # provided by the GNOME runtime, so no from-source build is required. The GNOME # 50 Platform ships libwebkit2gtk-4.1.so.0 (verified), which Tauri v2 needs. # # The Flathub app-id is app.geolibre.GeoLibre (reverse-domain of geolibre.app); # the app's internal Tauri identifier stays org.geolibre.desktop, so user data # and settings are unaffected. On each release, bump the .deb `url`/`sha256` # (and `runtime-version` when adopting a newer, still-webkit2gtk-4.1 runtime). id: app.geolibre.GeoLibre runtime: org.gnome.Platform runtime-version: '50' sdk: org.gnome.Sdk command: geolibre-desktop finish-args: - --share=ipc - --share=network - --socket=wayland - --socket=fallback-x11 - --device=dri # GeoLibre opens arbitrary local geospatial datasets (and their sidecar files), # like other GIS apps on Flathub; this needs a Flathub filesystem exception. - --filesystem=home modules: - name: geolibre buildsystem: simple build-commands: # A .deb is an `ar` archive of control/data tarballs; unpack the data tree. # Guard the glob (POSIX sh; no arrays) so a corrupt .deb fails clearly. - ar x geolibre.deb - | for data_tar in data.tar.*; do break; done [ -f "$data_tar" ] || { echo "no data.tar.* member in the .deb" >&2; exit 1; } tar -xf "$data_tar" - install -Dm755 "usr/bin/geolibre-desktop" "/app/bin/geolibre-desktop" # Keep the Tauri resource dir beside the binary (../lib/) so the # app resolves its bundled resources under /app exactly as under /usr. - | src="usr/lib/GeoLibre Desktop" [ -d "$src" ] || { echo "expected Tauri resource dir '$src' not found in the .deb" >&2; exit 1; } install -d "/app/lib" cp -r "$src" "/app/lib/" - install -Dm644 app.geolibre.GeoLibre.desktop /app/share/applications/app.geolibre.GeoLibre.desktop - install -Dm644 app.geolibre.GeoLibre.metainfo.xml /app/share/metainfo/app.geolibre.GeoLibre.metainfo.xml # Install the icons under the app-id name (Flathub convention). - | found=0 for png in usr/share/icons/hicolor/*/apps/geolibre-desktop.png; do [ -f "$png" ] || continue size="$(basename "$(dirname "$(dirname "$png")")")" install -Dm644 "$png" \ "/app/share/icons/hicolor/$size/apps/app.geolibre.GeoLibre.png" found=$((found + 1)) done [ "$found" -gt 0 ] || { echo "no PNG icons found in the .deb" >&2; exit 1; } sources: - type: file url: https://github.com/opengeos/GeoLibre/releases/download/v1.5.0/GeoLibre.Desktop_1.5.0_amd64.deb sha256: d1591ab243795fd51bf4653b20adec9836a21dea2d44b8ea403f70fb3bed2595 dest-filename: geolibre.deb x-checker-data: type: json url: https://api.github.com/repos/opengeos/GeoLibre/releases/latest version-query: .tag_name | sub("^v"; "") url-query: '"https://github.com/opengeos/GeoLibre/releases/download/v" + $version + "/GeoLibre.Desktop_" + $version + "_amd64.deb"' is-main-source: true - type: file path: app.geolibre.GeoLibre.desktop - type: file path: app.geolibre.GeoLibre.metainfo.xml