# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname=websocat
pkgver=1.13.0
pkgrel=0
pkgdesc="Netcat, curl and socat for WebSockets"
url="https://github.com/vi/websocat"
arch="all"
license="MIT"
makedepends="cargo openssl-dev>3 cargo-auditable"
options="net"
source="https://github.com/vi/websocat/archive/v$pkgver/websocat-$pkgver.tar.gz
	Cargo-update.patch"

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --locked
}

check() {
	cargo test --release --locked
}

package() {
	install -D -m 0755 "target/release/websocat" -t "$pkgdir/usr/bin"
}

sha512sums="
119cb6d0c226ed4f1df86a42a26903ba8465db30e5d0908d4a28601a58636e9a906fbb44d2d811ec9b25103a8c48b4ccea8b31f2f61854d062bc436ac6afac78  websocat-1.13.0.tar.gz
851dfd9725c2485fd990571dc1d2bfcc01ca8410b92981aa077be31234dfef09328bfc7aa2d7303cc05e9c327d4b9fd10caae0c4963b383d043e5b6aed565134  Cargo-update.patch
"
