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

# Auto-Generated by cargo-ebuild 0.5.4-r1

EAPI=8

CRATES="
	addr2line@0.21.0
	adler@1.0.2
	aho-corasick@1.1.2
	android-tzdata@0.1.1
	android_system_properties@0.1.5
	anstream@0.6.13
	anstyle@1.0.6
	anstyle-parse@0.2.3
	anstyle-query@1.0.2
	anstyle-wincon@3.0.2
	anyhow@1.0.80
	autocfg@1.1.0
	backtrace@0.3.69
	base64@0.21.7
	bitflags@1.3.2
	bitflags@2.4.2
	block-buffer@0.10.4
	bumpalo@3.15.4
	bytes@1.5.0
	cc@1.0.90
	cfg-if@1.0.0
	chrono@0.4.35
	clap@4.5.2
	clap_builder@4.5.2
	clap_complete@4.5.1
	clap_derive@4.5.0
	clap_lex@0.7.0
	colorchoice@1.0.0
	core-foundation@0.9.4
	core-foundation-sys@0.8.6
	cpufeatures@0.2.12
	crypto-common@0.1.6
	darling@0.20.8
	darling_core@0.20.8
	darling_macro@0.20.8
	digest@0.10.7
	dyn-clone@1.0.17
	either@1.10.0
	env_filter@0.1.0
	env_logger@0.11.3
	equivalent@1.0.1
	fnv@1.0.7
	form_urlencoded@1.2.1
	futures@0.3.30
	futures-channel@0.3.30
	futures-core@0.3.30
	futures-executor@0.3.30
	futures-io@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.12
	gimli@0.28.1
	hashbrown@0.14.3
	heck@0.4.1
	hermit-abi@0.3.9
	home@0.5.9
	http@0.2.12
	http-body@0.4.6
	http-range-header@0.3.1
	httparse@1.8.0
	httpdate@1.0.3
	humantime@2.1.0
	hyper@0.14.28
	hyper-rustls@0.24.2
	hyper-timeout@0.4.1
	iana-time-zone@0.1.60
	iana-time-zone-haiku@0.1.2
	ident_case@1.0.1
	indexmap@2.2.5
	itoa@1.0.10
	js-sys@0.3.69
	jsonpath-rust@0.4.0
	k8s-openapi@0.21.1
	kube@0.88.1
	kube-client@0.88.1
	kube-core@0.88.1
	kube-derive@0.88.1
	libc@0.2.153
	lock_api@0.4.11
	log@0.4.21
	memchr@2.7.1
	mime@0.3.17
	miniz_oxide@0.7.2
	mio@0.8.11
	num-traits@0.2.18
	num_cpus@1.16.0
	object@0.32.2
	once_cell@1.19.0
	openssl-probe@0.1.5
	ordered-float@2.10.1
	parking_lot@0.12.1
	parking_lot_core@0.9.9
	pem@3.0.3
	percent-encoding@2.3.1
	pest@2.7.8
	pest_derive@2.7.8
	pest_generator@2.7.8
	pest_meta@2.7.8
	pin-project@1.1.5
	pin-project-internal@1.1.5
	pin-project-lite@0.2.13
	pin-utils@0.1.0
	proc-macro2@1.0.78
	quote@1.0.35
	redox_syscall@0.4.1
	regex@1.10.3
	regex-automata@0.4.6
	regex-syntax@0.8.2
	ring@0.17.8
	rustc-demangle@0.1.23
	rustls@0.21.10
	rustls-native-certs@0.6.3
	rustls-pemfile@1.0.4
	rustls-webpki@0.101.7
	ryu@1.0.17
	schannel@0.1.23
	schemars@0.8.16
	schemars_derive@0.8.16
	scopeguard@1.2.0
	sct@0.7.1
	secrecy@0.8.0
	security-framework@2.9.2
	security-framework-sys@2.9.1
	serde@1.0.197
	serde-value@0.7.0
	serde_derive@1.0.197
	serde_derive_internals@0.26.0
	serde_json@1.0.114
	serde_yaml@0.9.32
	sha2@0.10.8
	signal-hook-registry@1.4.1
	slab@0.4.9
	smallvec@1.13.1
	socket2@0.5.6
	spin@0.9.8
	strsim@0.10.0
	strsim@0.11.0
	syn@1.0.109
	syn@2.0.52
	thiserror@1.0.57
	thiserror-impl@1.0.57
	tokio@1.36.0
	tokio-io-timeout@1.2.0
	tokio-macros@2.2.0
	tokio-rustls@0.24.1
	tokio-util@0.7.10
	tower@0.4.13
	tower-http@0.4.4
	tower-layer@0.3.2
	tower-service@0.3.2
	tracing@0.1.40
	tracing-attributes@0.1.27
	tracing-core@0.1.32
	try-lock@0.2.5
	typed-builder@0.18.1
	typed-builder-macro@0.18.1
	typenum@1.17.0
	ucd-trie@0.1.6
	unicode-ident@1.0.12
	unsafe-libyaml@0.2.10
	untrusted@0.9.0
	utf8parse@0.2.1
	version_check@0.9.4
	want@0.3.1
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen@0.2.92
	wasm-bindgen-backend@0.2.92
	wasm-bindgen-macro@0.2.92
	wasm-bindgen-macro-support@0.2.92
	wasm-bindgen-shared@0.2.92
	windows-core@0.52.0
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-targets@0.48.5
	windows-targets@0.52.4
	windows_aarch64_gnullvm@0.48.5
	windows_aarch64_gnullvm@0.52.4
	windows_aarch64_msvc@0.48.5
	windows_aarch64_msvc@0.52.4
	windows_i686_gnu@0.48.5
	windows_i686_gnu@0.52.4
	windows_i686_msvc@0.48.5
	windows_i686_msvc@0.52.4
	windows_x86_64_gnu@0.48.5
	windows_x86_64_gnu@0.52.4
	windows_x86_64_gnullvm@0.48.5
	windows_x86_64_gnullvm@0.52.4
	windows_x86_64_msvc@0.48.5
	windows_x86_64_msvc@0.52.4
	zeroize@1.7.0
"

inherit cargo shell-completion

DESCRIPTION="Kubernetes OPenapI UnMangler"
HOMEPAGE="https://github.com/kube-rs/kopium"
SRC_URI="
	https://github.com/kube-rs/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="Apache-2.0"
# Dependent crate licenses
LICENSE+=" Apache-2.0 ISC MIT Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64"

# rust does not use *FLAGS from make.conf, silence portage warning
# update with proper path to binaries this crate installs, omit leading /
QA_FLAGS_IGNORED="usr/bin/${PN}"

src_compile() {
	cargo_src_compile

	target/release/${PN} completions bash > bash-completion.sh
	target/release/${PN} completions zsh > zsh-completion.zsh
}

src_install() {
	cargo_src_install

	einstalldocs

	newbashcomp bash-completion.sh ${PN}
	newzshcomp zsh-completion.zsh _${PN}
}