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

# Autogenerated by pycargoebuild 0.15.0

EAPI=8

CRATES="
	aead@0.6.0-rc.2
	aho-corasick@1.1.4
	allocator-api2@0.2.21
	android_system_properties@0.1.5
	annotate-snippets@0.9.2
	anstream@0.6.21
	anstyle-parse@0.2.7
	anstyle-query@1.1.5
	anstyle-wincon@3.0.11
	anstyle@1.0.13
	arrayref@0.3.9
	arrayvec@0.7.6
	assert_cmd@2.1.2
	assert_fs@1.1.3
	async-compat@0.2.5
	async-trait@0.1.89
	async_io_stream@0.3.3
	atomic-polyfill@1.0.3
	atomic-waker@1.1.2
	attohttpc@0.30.1
	autocfg@1.5.0
	backon@1.6.0
	base16ct@1.0.0
	base32@0.5.1
	base64@0.13.1
	base64@0.22.1
	base64ct@1.8.3
	bincode@1.3.3
	bindgen@0.70.1
	bitflags@2.10.0
	blake3@1.8.3
	block-buffer@0.11.0
	bstr@1.12.1
	bumpalo@3.19.1
	byteorder@1.5.0
	bytes@1.11.0
	cc@1.2.53
	cesu8@1.1.0
	cexpr@0.6.0
	cfg-if@1.0.4
	cfg_aliases@0.2.1
	chacha20@0.10.0-rc.2
	chrono@0.4.43
	cipher@0.5.0-rc.1
	clang-sys@1.8.1
	clap@4.5.54
	clap_builder@4.5.54
	clap_complete@4.5.65
	clap_derive@4.5.49
	clap_lex@0.7.7
	clap_mangen@0.2.31
	cobs@0.3.0
	colorchoice@1.0.4
	combine@4.6.7
	const-oid@0.10.2
	constant_time_eq@0.4.2
	convert_case@0.10.0
	cordyceps@0.3.4
	core-foundation-sys@0.8.7
	core-foundation@0.10.1
	core-foundation@0.9.4
	cpufeatures@0.2.17
	critical-section@1.2.0
	crossbeam-channel@0.5.15
	crossbeam-deque@0.8.6
	crossbeam-epoch@0.9.18
	crossbeam-utils@0.8.21
	crypto-common@0.2.0-rc.4
	crypto_box@0.10.0-pre.0
	crypto_secretbox@0.2.0-pre.0
	curve25519-dalek-derive@0.1.1
	curve25519-dalek@5.0.0-pre.1
	data-encoding@2.10.0
	der@0.8.0-rc.10
	deranged@0.5.5
	derive_more-impl@1.0.0
	derive_more-impl@2.1.1
	derive_more@1.0.0
	derive_more@2.1.1
	diatomic-waker@0.2.3
	difflib@0.4.0
	digest@0.11.0-rc.3
	displaydoc@0.2.5
	dlopen2@0.5.0
	doc-comment@0.3.4
	document-features@0.2.12
	dyn-clone@1.0.20
	ed25519-dalek@3.0.0-pre.1
	ed25519@3.0.0-rc.2
	either@1.15.0
	embedded-io@0.4.0
	embedded-io@0.6.1
	enum-as-inner@0.6.1
	equivalent@1.0.2
	errno@0.3.14
	fastrand@2.3.0
	fiat-crypto@0.3.0
	find-msvc-tools@0.1.8
	float-cmp@0.10.0
	fnv@1.0.7
	foldhash@0.2.0
	form_urlencoded@1.2.2
	futures-buffered@0.2.12
	futures-channel@0.3.31
	futures-core@0.3.31
	futures-executor@0.3.31
	futures-io@0.3.31
	futures-lite@2.6.1
	futures-macro@0.3.31
	futures-sink@0.3.31
	futures-task@0.3.31
	futures-util@0.3.31
	futures@0.3.31
	generator@0.8.8
	getrandom@0.2.17
	getrandom@0.3.4
	glob@0.3.3
	globset@0.4.18
	globwalk@0.9.1
	gloo-timers@0.3.0
	h2@0.4.13
	hash32@0.2.1
	hashbrown@0.16.1
	heapless@0.7.17
	heck@0.5.0
	hermit-abi@0.5.2
	hickory-proto@0.25.2
	hickory-resolver@0.25.2
	http-body-util@0.1.3
	http-body@1.0.1
	http@1.4.0
	httparse@1.10.1
	httpdate@1.0.3
	hybrid-array@0.4.5
	hyper-rustls@0.27.7
	hyper-util@0.1.19
	hyper@1.8.1
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.64
	icu_collections@2.1.1
	icu_locale_core@2.1.1
	icu_normalizer@2.1.1
	icu_normalizer_data@2.1.1
	icu_properties@2.1.2
	icu_properties_data@2.1.2
	icu_provider@2.1.1
	idna@1.1.0
	idna_adapter@1.2.1
	igd-next@0.16.2
	ignore@0.4.25
	indexmap@2.13.0
	inout@0.2.2
	instant@0.1.13
	ipconfig@0.3.2
	ipnet@2.11.0
	ipset@0.9.0
	ipset_derive@0.1.1
	iri-string@0.7.10
	iroh-base@0.95.1
	iroh-metrics-derive@0.4.0
	iroh-metrics@0.37.0
	iroh-quinn-proto@0.13.0
	iroh-quinn-udp@0.5.7
	iroh-quinn@0.14.0
	iroh-relay@0.95.1
	iroh@0.95.1
	is_terminal_polyfill@1.70.2
	itertools@0.13.0
	itoa@1.0.17
	jni-sys@0.3.0
	jni@0.21.1
	jrsonnet-evaluator@0.4.2
	jrsonnet-gc-derive@0.4.1
	jrsonnet-gc@0.4.2
	jrsonnet-interner@0.4.2
	jrsonnet-parser@0.4.2
	jrsonnet-stdlib@0.4.2
	jrsonnet-types@0.4.2
	js-sys@0.3.85
	lazy_static@1.5.0
	libc@0.2.180
	libloading@0.8.9
	libnftables1-sys@0.1.1
	linux-raw-sys@0.11.0
	litemap@0.8.1
	litrs@1.0.0
	lock_api@0.4.14
	log@0.4.29
	loom@0.7.2
	lru-slab@0.1.2
	lru@0.16.3
	matchers@0.2.0
	md5@0.7.0
	memchr@2.7.6
	minimal-lexical@0.2.1
	mio@1.1.1
	moka@0.12.12
	n0-error-macros@0.1.3
	n0-error@0.1.3
	n0-future@0.3.2
	n0-watcher@0.5.0
	netdev@0.38.2
	netlink-packet-core@0.8.1
	netlink-packet-route@0.25.1
	netlink-proto@0.12.0
	netlink-sys@0.8.7
	netwatch@0.12.0
	nftables@0.6.3
	nix@0.29.0
	nom@7.1.3
	normalize-line-endings@0.3.0
	ntimestamp@1.0.0
	nu-ansi-term@0.50.3
	num-conv@0.1.0
	num-traits@0.2.19
	num_cpus@1.17.0
	num_enum@0.7.5
	num_enum_derive@0.7.5
	once_cell@1.21.3
	once_cell_polyfill@1.70.2
	openssl-probe@0.2.0
	parking@2.2.1
	parking_lot@0.12.5
	parking_lot_core@0.9.12
	paste@1.0.15
	pathdiff@0.2.3
	peg-macros@0.7.0
	peg-runtime@0.7.0
	peg@0.7.0
	pem-rfc7468@1.0.0
	percent-encoding@2.3.2
	pharos@0.5.3
	pin-project-internal@1.1.10
	pin-project-lite@0.2.16
	pin-project@1.1.10
	pin-utils@0.1.0
	pkarr@5.0.2
	pkcs8@0.11.0-rc.8
	poly1305@0.9.0-rc.2
	portable-atomic@1.13.0
	portmapper@0.12.0
	postbag@0.4.1
	postcard-derive@0.2.2
	postcard@1.1.3
	potential_utf@0.1.4
	powerfmt@0.2.0
	ppv-lite86@0.2.21
	predicates-core@1.0.9
	predicates-tree@1.0.12
	predicates@3.1.3
	prettyplease@0.2.37
	proc-macro-crate@3.4.0
	proc-macro2@1.0.105
	quinn-proto@0.11.13
	quinn-udp@0.5.14
	quinn@0.11.9
	quote@1.0.43
	r-efi@5.3.0
	rand@0.8.5
	rand@0.9.2
	rand_chacha@0.3.1
	rand_chacha@0.9.0
	rand_core@0.6.4
	rand_core@0.9.5
	redox_syscall@0.5.18
	ref-cast-impl@1.0.25
	ref-cast@1.0.25
	regex-automata@0.4.13
	regex-syntax@0.8.8
	regex@1.12.2
	remoc@0.18.3
	remoc_macro@0.18.3
	reqwest@0.12.28
	resolv-conf@0.7.6
	ring@0.17.14
	roff@0.2.2
	rustc-hash@1.1.0
	rustc-hash@2.1.1
	rustc_version@0.4.1
	rustix@1.1.3
	rustls-native-certs@0.8.3
	rustls-pki-types@1.14.0
	rustls-platform-verifier-android@0.1.1
	rustls-platform-verifier@0.5.3
	rustls-webpki@0.103.9
	rustls@0.23.36
	rustversion@1.0.22
	ryu@1.0.22
	salsa20@0.11.0-rc.1
	same-file@1.0.6
	schannel@0.1.28
	schemars@1.2.1
	schemars_derive@1.2.1
	scoped-tls@1.0.1
	scopeguard@1.2.0
	security-framework-sys@2.15.0
	security-framework@3.5.1
	self_cell@1.2.2
	semver@1.0.27
	send_wrapper@0.6.0
	serde@1.0.228
	serde_bytes@0.11.19
	serde_core@1.0.228
	serde_derive@1.0.228
	serde_derive_internals@0.29.1
	serde_json@1.0.149
	serde_path_to_error@0.1.20
	serde_urlencoded@0.7.1
	serde_yaml@0.9.34+deprecated
	serdect@0.4.2
	sha1@0.11.0-rc.2
	sha1_smol@1.0.1
	sha2@0.11.0-rc.2
	sharded-slab@0.1.7
	shlex@1.3.0
	signal-hook-registry@1.4.8
	signature@3.0.0-rc.6
	simdutf8@0.1.5
	simple-dns@0.9.3
	slab@0.4.11
	smallvec@1.15.1
	socket2@0.5.10
	socket2@0.6.1
	spez@0.1.2
	spin@0.10.0
	spin@0.9.8
	spki@0.8.0-rc.4
	stable_deref_trait@1.2.1
	strsim@0.11.1
	strum@0.27.2
	strum_macros@0.27.2
	subtle@2.6.1
	syn@1.0.109
	syn@2.0.114
	sync_wrapper@1.0.2
	synstructure@0.12.6
	synstructure@0.13.2
	system-configuration-sys@0.6.0
	system-configuration@0.6.1
	tagptr@0.2.0
	tempfile@3.24.0
	termtree@0.5.1
	thiserror-impl@1.0.69
	thiserror-impl@2.0.18
	thiserror@1.0.69
	thiserror@2.0.18
	thread_local@1.1.9
	time-core@0.1.7
	time@0.3.45
	tinystr@0.8.2
	tinyvec@1.10.0
	tinyvec_macros@0.1.1
	tokio-macros@2.6.0
	tokio-rustls@0.26.4
	tokio-stream@0.1.18
	tokio-util@0.7.18
	tokio-websockets@0.12.3
	tokio@1.49.0
	toml_datetime@0.7.5+spec-1.1.0
	toml_edit@0.23.10+spec-1.0.0
	toml_parser@1.0.6+spec-1.1.0
	tower-http@0.6.8
	tower-layer@0.3.3
	tower-service@0.3.3
	tower@0.5.3
	tracing-attributes@0.1.31
	tracing-core@0.1.36
	tracing-log@0.2.0
	tracing-subscriber@0.3.22
	tracing@0.1.44
	try-lock@0.2.5
	typenum@1.19.0
	unescape@0.1.0
	unicode-ident@1.0.22
	unicode-segmentation@1.12.0
	unicode-width@0.1.14
	unicode-xid@0.2.6
	universal-hash@0.6.0-rc.2
	unsafe-libyaml@0.2.11
	untrusted@0.9.0
	url@2.5.8
	utf8_iter@1.0.4
	utf8parse@0.2.2
	uuid@1.19.0
	valuable@0.1.1
	wait-timeout@0.2.1
	walkdir@2.5.0
	want@0.3.1
	wasi@0.11.1+wasi-snapshot-preview1
	wasip2@1.0.2+wasi-0.2.9
	wasm-bindgen-futures@0.4.58
	wasm-bindgen-macro-support@0.2.108
	wasm-bindgen-macro@0.2.108
	wasm-bindgen-shared@0.2.108
	wasm-bindgen@0.2.108
	wasm-streams@0.4.2
	web-sys@0.3.85
	web-time@1.1.0
	webpki-root-certs@0.26.11
	webpki-root-certs@1.0.5
	webpki-roots@1.0.5
	widestring@1.2.1
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.11
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-collections@0.3.2
	windows-core@0.62.2
	windows-future@0.3.2
	windows-implement@0.60.2
	windows-interface@0.59.3
	windows-link@0.2.1
	windows-numerics@0.3.1
	windows-result@0.4.1
	windows-strings@0.5.1
	windows-sys@0.45.0
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-sys@0.59.0
	windows-sys@0.60.2
	windows-sys@0.61.2
	windows-targets@0.42.2
	windows-targets@0.48.5
	windows-targets@0.52.6
	windows-targets@0.53.5
	windows-threading@0.2.1
	windows@0.62.2
	windows_aarch64_gnullvm@0.42.2
	windows_aarch64_gnullvm@0.48.5
	windows_aarch64_gnullvm@0.52.6
	windows_aarch64_gnullvm@0.53.1
	windows_aarch64_msvc@0.42.2
	windows_aarch64_msvc@0.48.5
	windows_aarch64_msvc@0.52.6
	windows_aarch64_msvc@0.53.1
	windows_i686_gnu@0.42.2
	windows_i686_gnu@0.48.5
	windows_i686_gnu@0.52.6
	windows_i686_gnu@0.53.1
	windows_i686_gnullvm@0.52.6
	windows_i686_gnullvm@0.53.1
	windows_i686_msvc@0.42.2
	windows_i686_msvc@0.48.5
	windows_i686_msvc@0.52.6
	windows_i686_msvc@0.53.1
	windows_x86_64_gnu@0.42.2
	windows_x86_64_gnu@0.48.5
	windows_x86_64_gnu@0.52.6
	windows_x86_64_gnu@0.53.1
	windows_x86_64_gnullvm@0.42.2
	windows_x86_64_gnullvm@0.48.5
	windows_x86_64_gnullvm@0.52.6
	windows_x86_64_gnullvm@0.53.1
	windows_x86_64_msvc@0.42.2
	windows_x86_64_msvc@0.48.5
	windows_x86_64_msvc@0.52.6
	windows_x86_64_msvc@0.53.1
	winnow@0.7.14
	winreg@0.50.0
	wit-bindgen@0.51.0
	wmi@0.17.3
	writeable@0.6.2
	ws_stream_wasm@0.7.5
	xml-rs@0.8.28
	xmltree@0.10.3
	yansi-term@0.1.2
	yoke-derive@0.8.1
	yoke@0.8.1
	z32@1.3.0
	zerocopy-derive@0.8.33
	zerocopy@0.8.33
	zerofrom-derive@0.1.6
	zerofrom@0.1.6
	zeroize@1.8.2
	zeroize_derive@1.4.3
	zerotrie@0.2.3
	zerovec-derive@0.11.2
	zerovec@0.11.5
	zmij@1.0.15
"
inherit cargo shell-completion systemd

DESCRIPTION="Scan logs and take action"
HOMEPAGE="https://reaction.ppom.me"
SRC_URI="
	https://framagit.org/ppom/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.gz
	${CARGO_CRATE_URIS}
"
S="$WORKDIR/${PN}-v${PV}"

LICENSE="AGPL-3"
# Dependent crate licenses
LICENSE+=" Apache-2.0 MIT MPL-2.0 Unicode-3.0"
SLOT="0"
KEYWORDS="~amd64"
RUST_MIN_VER="1.82.0"

src_install() {
	cargo_src_install
	newbashcomp target/release/${PN}.bash ${PN}
	dofishcomp target/release/${PN}.fish
	systemd_dounit "${FILESDIR}/systemd/${PN}.service"
	doman target/release/*.[0-9]
	doinitd "${FILESDIR}/init.d/${PN}"
	keepdir /var/lib/${PN}
	keepdir /etc/${PN}.d
}