#!/SBUILD _disabled: false pkg: "binfmt" pkg_id: "tonistiigi.binfmt" pkg_type: "static" ghcr_pkg: "tonistiigi/binfmt" category: - "ConsoleOnly" - "Emulator" - "System" description: "Cross-platform emulator collection distributed with Docker images" homepage: - "https://github.com/tonistiigi/binfmt" maintainer: - "QaidVoid (contact@qaidvoid.dev)" license: - "MIT" build_asset: - url: "https://raw.githubusercontent.com/tonistiigi/binfmt/master/LICENSE" out: "LICENSE" note: - "Official binary from https://github.com/tonistiigi/binfmt" - "[PORTABLE] (Portable Static Binary)" - "[NO_DESKTOP_INTEGRATION]" provides: - "binfmt" src_url: - "https://github.com/tonistiigi/binfmt" tag: - "binfmt" - "emulation" - "container" x_exec: host: - "x86_64-linux" - "aarch64-linux" shell: "sh" pkgver: | curl -qfsSL "https://api.github.com/repos/tonistiigi/binfmt/releases/latest" | jq -r '.tag_name' | tr -d 'deploy/v' run: | case "$ARCH" in x86_64) ARCH="amd64" ;; aarch64) ARCH="arm64" ;; esac soar dl "https://github.com/tonistiigi/binfmt@deploy/v${PKGVER}" --glob "binfmt_linux-${ARCH}.tar.gz" --yes -o binfmt.tar.gz tar -xf "binfmt.tar.gz" -C "$SBUILD_TMPDIR/" mv "$SBUILD_TMPDIR/binfmt" "$SBUILD_OUTDIR/binfmt" rm -rf "binfmt.tar.gz" strip binfmt