# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.15.0

EAPI=8

CRATES="
	addr2line@0.20.0
	adler@1.0.2
	android-tzdata@0.1.1
	android_system_properties@0.1.5
	anstream@0.6.4
	anstyle-parse@0.2.2
	anstyle-query@1.0.0
	anstyle-wincon@3.0.1
	anstyle@1.0.4
	autocfg@1.1.0
	backtrace@0.3.68
	base64@0.21.7
	base64@0.22.1
	bitflags@2.6.0
	block-buffer@0.10.4
	bumpalo@3.13.0
	byteorder@1.4.3
	bytes@1.4.0
	cc@1.0.79
	cfg-if@1.0.0
	chrono@0.4.26
	clap@4.4.8
	clap_builder@4.4.8
	clap_derive@4.4.7
	clap_lex@0.6.0
	colorchoice@1.0.0
	core-foundation-sys@0.8.4
	cpufeatures@0.2.9
	crypto-common@0.1.6
	darling@0.20.3
	darling_core@0.20.3
	darling_macro@0.20.3
	data-encoding@2.4.0
	deranged@0.4.0
	digest@0.10.7
	equivalent@1.0.1
	fnv@1.0.7
	form_urlencoded@1.2.0
	futures-core@0.3.30
	futures-macro@0.3.30
	futures-sink@0.3.30
	futures-task@0.3.30
	futures-util@0.3.30
	generic-array@0.14.7
	getrandom@0.2.10
	gimli@0.27.3
	hashbrown@0.12.3
	hashbrown@0.14.3
	heck@0.4.1
	hermit-abi@0.3.9
	hex@0.4.3
	http@0.2.12
	httparse@1.8.0
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.57
	ident_case@1.0.1
	idna@0.4.0
	indexmap@1.9.3
	indexmap@2.1.0
	itoa@1.0.9
	js-sys@0.3.64
	libc@0.2.152
	log@0.4.19
	memchr@2.5.0
	miniz_oxide@0.7.1
	mio@1.0.2
	num-conv@0.1.0
	num-traits@0.2.15
	object@0.31.1
	obws@0.11.5
	once_cell@1.18.0
	percent-encoding@2.3.0
	pin-project-lite@0.2.13
	pin-utils@0.1.0
	powerfmt@0.2.0
	ppv-lite86@0.2.17
	proc-macro2@1.0.78
	quote@1.0.35
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	rgb@0.8.50
	rustc-demangle@0.1.23
	ryu@1.0.15
	semver@1.0.23
	serde@1.0.209
	serde_derive@1.0.209
	serde_json@1.0.127
	serde_repr@0.1.19
	serde_with@3.9.0
	serde_with_macros@3.9.0
	sha1@0.10.5
	sha2@0.10.8
	slab@0.4.8
	socket2@0.5.5
	strsim@0.10.0
	syn@2.0.48
	thiserror-impl@1.0.63
	thiserror@1.0.63
	time-core@0.1.4
	time-macros@0.2.22
	time@0.3.41
	tinyvec@1.6.0
	tinyvec_macros@0.1.1
	tokio-macros@2.4.0
	tokio-tungstenite@0.20.1
	tokio@1.40.0
	tracing-attributes@0.1.27
	tracing-core@0.1.32
	tracing@0.1.40
	tungstenite@0.20.1
	typenum@1.16.0
	unicode-bidi@0.3.13
	unicode-ident@1.0.11
	unicode-normalization@0.1.22
	url@2.4.1
	utf-8@0.7.6
	utf8parse@0.2.1
	version_check@0.9.4
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.87
	wasm-bindgen-macro-support@0.2.87
	wasm-bindgen-macro@0.2.87
	wasm-bindgen-shared@0.2.87
	wasm-bindgen@0.2.87
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-targets@0.48.1
	windows-targets@0.52.6
	windows@0.48.0
	windows_aarch64_gnullvm@0.48.0
	windows_aarch64_gnullvm@0.52.6
	windows_aarch64_msvc@0.48.0
	windows_aarch64_msvc@0.52.6
	windows_i686_gnu@0.48.0
	windows_i686_gnu@0.52.6
	windows_i686_gnullvm@0.52.6
	windows_i686_msvc@0.48.0
	windows_i686_msvc@0.52.6
	windows_x86_64_gnu@0.48.0
	windows_x86_64_gnu@0.52.6
	windows_x86_64_gnullvm@0.48.0
	windows_x86_64_gnullvm@0.52.6
	windows_x86_64_msvc@0.48.0
	windows_x86_64_msvc@0.52.6
"

inherit cargo

DESCRIPTION="A minimal obs CLI for obs-websocket v5"
HOMEPAGE="https://github.com/grigio/obs-cmd"
SRC_URI="
	https://github.com/grigio/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
	MIT Unicode-DFS-2016
	|| ( Apache-2.0 Boost-1.0 )
"
SLOT="0"
KEYWORDS="~amd64"

RESTRICT="mirror"

src_prepare() {
	# The version in Cargo.toml is often outdated. The author creates tags in Github
	# when they create new releases and there doesn't seem to be a good way to keep
	# Cargo.toml in sync automatically, so we'll just override it with PV.
	sed -i -e "/^\[package\]$/,/^\[/ s/^version.*$/version = \"${PV}\"/" "${S}/Cargo.toml"
	default
}

src_install() {
	dobin "$(cargo_target_dir)"/obs-cmd
}