Something went wrong. Try again.
🔭 A minimal and fast FITS/XISF viewer for astro images for Windows, MacOS, and Linux blip.sascha.sh
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940#!/usr/bin/env bash# Builds the Linux release for the current architecture (x86_64 or aarch64) into dist/:## - blip-<version>-linux-<arch>.flatpak, a single-file Flatpak bundle (sh.sascha.blip)# - blip-<version>-linux-<arch>.tar.gz with the standalone binary and the license files# (the archive keeps the executable bit)## ./scripts/package-linux.sh## Needs Rust plus flatpak and flatpak-builder with the Flathub remote, for the# org.freedesktop.Platform//24.08 runtime and SDK. cargo-about is installed on first use.# The binary links against glibc alone and loads the X11/Wayland, xkbcommon and Vulkan/EGL# libraries at runtime; the Flatpak runtime provides them.
set -euo pipefailcd "$(dirname "$0")/.."
if ! command -v cargo-about >/dev/null; then cargo install cargo-about --version 0.9.2 --locked --features clifi
cargo build --release --lockedcargo about generate about.hbs -o target/THIRD_PARTY_LICENSES.txt
version=$(cargo pkgid | sed 's/.*[@#]//')arch=$(uname -m)mkdir -p dist
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakreporm -rf target/flatpak-repo target/flatpak-buildflatpak-builder --user --force-clean --install-deps-from=flathub \ --repo=target/flatpak-repo target/flatpak-build packaging/flatpak/sh.sascha.blip.ymlflatpak build-bundle --arch="$arch" target/flatpak-repo "dist/blip-${version}-linux-${arch}.flatpak" sh.sascha.blip
stage=target/linux-tarrm -rf "$stage"mkdir -p "$stage"cp target/release/blip LICENSE target/THIRD_PARTY_LICENSES.txt "$stage"tar -czf "dist/blip-${version}-linux-${arch}.tar.gz" -C "$stage" .