#!/usr/bin/env bash
# Copyright (c) 2020 The Toltec Contributors
# SPDX-License-Identifier: MIT

pkgnames=(restream)
pkgdesc="Binary framebuffer capture tool for the reStream script"
url=https://github.com/rien/reStream
pkgver=1.2.0-1
timestamp=2021-11-04T19:09:14Z
section="screensharing"
maintainer="Dan Shick <dan.shick@gmail.com>"
license=MIT

image=rust:v2.1
source=("https://github.com/rien/reStream/archive/refs/tags/${pkgver%-*}.tar.gz")
sha256sums=(4166142b15e1e7363dac302aa92aad5b44e0514cab233abecb51414952c1d5a1)

build() {
    cargo build --release --bin restream
}

package() {
    install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/restream
}

configure() {
    cat << 'MSG'

This app is only the device-side half of reStream. The companion script for
consuming the output of this app can be found at
<https://github.com/rien/reStream>.

MSG
}
