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

# Autogenerated by pycargoebuild 0.13.4

EAPI=8

CRATES="
	acme2@0.5.1
	addr2line@0.20.0
	adler@1.0.2
	aho-corasick@1.0.2
	anstream@0.3.2
	anstyle-parse@0.2.1
	anstyle-query@1.0.0
	anstyle-wincon@1.0.1
	anstyle@1.0.1
	anyhow@1.0.71
	async-trait@0.1.71
	autocfg@1.1.0
	backtrace@0.3.68
	base64@0.13.1
	base64@0.21.2
	bitflags@1.3.2
	bitflags@2.4.1
	block-buffer@0.10.4
	bumpalo@3.13.0
	bytes@1.4.0
	cc@1.0.94
	cfg-if@1.0.0
	clap@4.3.11
	clap_builder@4.3.11
	clap_lex@0.5.0
	colorchoice@1.0.0
	core-foundation-sys@0.8.4
	core-foundation@0.9.3
	cpufeatures@0.2.9
	crypto-common@0.1.6
	data-encoding@2.4.0
	digest@0.10.7
	encoding_rs@0.8.32
	enum-as-inner@0.6.0
	equivalent@1.0.1
	errno-dragonfly@0.1.2
	errno@0.3.1
	fastrand@1.9.0
	fnv@1.0.7
	foreign-types-shared@0.1.1
	foreign-types@0.3.2
	form_urlencoded@1.2.0
	futures-channel@0.3.28
	futures-core@0.3.31
	futures-io@0.3.28
	futures-macro@0.3.31
	futures-sink@0.3.28
	futures-task@0.3.31
	futures-util@0.3.31
	generic-array@0.14.7
	getrandom@0.2.10
	gimli@0.27.3
	h2@0.3.26
	hashbrown@0.14.0
	heck@0.4.1
	hermit-abi@0.3.2
	hickory-proto@0.24.0
	hickory-server@0.24.0
	http-body@0.4.5
	http@0.2.9
	httparse@1.8.0
	httpdate@1.0.2
	hyper-rustls@0.24.1
	hyper-tls@0.5.0
	hyper@0.14.27
	idna@0.4.0
	indexmap@2.0.0
	instant@0.1.12
	io-lifetimes@1.0.11
	ipnet@2.8.0
	is-terminal@0.4.9
	itoa@1.0.8
	js-sys@0.3.64
	lazy_static@1.4.0
	libc@0.2.153
	linux-raw-sys@0.3.8
	linux-raw-sys@0.4.11
	log@0.4.19
	matchers@0.1.0
	memchr@2.5.0
	mime@0.3.17
	miniz_oxide@0.7.1
	mio@0.8.11
	native-tls@0.2.11
	nu-ansi-term@0.46.0
	num_cpus@1.16.0
	object@0.31.1
	once_cell@1.18.0
	openssl-macros@0.1.1
	openssl-probe@0.1.5
	openssl-sys@0.9.103
	openssl@0.10.66
	overload@0.1.1
	percent-encoding@2.3.0
	pin-project-internal@1.1.2
	pin-project-lite@0.2.13
	pin-project@1.1.2
	pin-utils@0.1.0
	pkg-config@0.3.27
	ppv-lite86@0.2.17
	proc-macro2@1.0.89
	quote@1.0.37
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	redox_syscall@0.3.5
	regex-automata@0.1.10
	regex-automata@0.3.2
	regex-syntax@0.6.29
	regex-syntax@0.7.4
	regex@1.9.1
	reqwest@0.11.18
	ring@0.16.20
	ring@0.17.8
	rustc-demangle@0.1.23
	rustix@0.37.27
	rustix@0.38.13
	rustls-pemfile@1.0.3
	rustls-webpki@0.101.7
	rustls@0.21.11
	ryu@1.0.14
	schannel@0.1.22
	sct@0.7.0
	security-framework-sys@2.9.0
	security-framework@2.9.1
	serde@1.0.171
	serde_derive@1.0.171
	serde_json@1.0.100
	serde_spanned@0.6.3
	serde_urlencoded@0.7.1
	sha2@0.10.7
	sharded-slab@0.1.4
	slab@0.4.8
	smallvec@1.11.0
	socket2@0.4.9
	spin@0.5.2
	spin@0.9.8
	strsim@0.10.0
	syn@2.0.85
	tempfile@3.6.0
	thiserror-impl@1.0.43
	thiserror@1.0.43
	thread_local@1.1.7
	time-core@0.1.1
	time@0.3.23
	tinyvec@1.6.0
	tinyvec_macros@0.1.1
	tokio-macros@2.1.0
	tokio-native-tls@0.3.1
	tokio-rustls@0.24.1
	tokio-util@0.7.10
	tokio@1.29.1
	toml@0.7.6
	toml_datetime@0.6.3
	toml_edit@0.19.12
	tower-service@0.3.2
	tracing-attributes@0.1.26
	tracing-core@0.1.31
	tracing-error@0.2.0
	tracing-futures@0.2.5
	tracing-log@0.1.3
	tracing-subscriber@0.3.17
	tracing@0.1.37
	try-lock@0.2.4
	typenum@1.16.0
	unicode-bidi@0.3.13
	unicode-ident@1.0.10
	unicode-normalization@0.1.22
	untrusted@0.7.1
	untrusted@0.9.0
	url@2.4.0
	utf8parse@0.2.1
	valuable@0.1.0
	vcpkg@0.2.15
	version_check@0.9.4
	want@0.3.1
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.87
	wasm-bindgen-futures@0.4.37
	wasm-bindgen-macro-support@0.2.87
	wasm-bindgen-macro@0.2.87
	wasm-bindgen-shared@0.2.87
	wasm-bindgen@0.2.87
	web-sys@0.3.64
	webpki-roots@0.22.6
	webpki@0.22.2
	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.5
	windows_aarch64_gnullvm@0.48.0
	windows_aarch64_gnullvm@0.52.5
	windows_aarch64_msvc@0.48.0
	windows_aarch64_msvc@0.52.5
	windows_i686_gnu@0.48.0
	windows_i686_gnu@0.52.5
	windows_i686_gnullvm@0.52.5
	windows_i686_msvc@0.48.0
	windows_i686_msvc@0.52.5
	windows_x86_64_gnu@0.48.0
	windows_x86_64_gnu@0.52.5
	windows_x86_64_gnullvm@0.48.0
	windows_x86_64_gnullvm@0.52.5
	windows_x86_64_msvc@0.48.0
	windows_x86_64_msvc@0.52.5
	winnow@0.4.9
	winreg@0.10.1
"

inherit cargo fcaps

DESCRIPTION="A self-hosted ACME dns-01 challenge responder"
HOMEPAGE="https://github.com/krtab/agnos"
SRC_URI="
	${CARGO_CRATE_URIS}
	https://github.com/krtab/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	https://raw.githubusercontent.com/krtab/${PN}/v${PV}/config_example.toml -> ${P}_example.toml
"

LICENSE="MIT"
# cargo-license output (abridged)
#   (Apache-2.0 OR MIT) AND BSD-3-Clause (1)
#   (MIT OR Apache-2.0) AND Unicode-DFS-2016 (1)
#   0BSD OR Apache-2.0 OR MIT (1)
#   Apache-2.0 (1)
#   Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT (6)
#   Apache-2.0 OR BSL-1.0 (1)
#   Apache-2.0 OR ISC OR MIT (4)
#   Apache-2.0 OR MIT (143)
#   Apache-2.0 OR MIT OR Zlib (3)
#   BSD-3-Clause (1)
#   Custom License File (3)
#   ISC (3)
#   MIT (39)
#   MIT OR Unlicense (3)
#   MPL-2.0 (1)
# non-standard license texts caught by cargo-license:
# - ring is BoringSSL-derived with additions (so, openssl ISC MIT)
# - webpki is "ISC-style"
# - ryu is dual Apache-2.0 or BSL-1.0 (a.k.a. $PORTDIR/licenses/Boost-1.0)
LICENSE+=" Apache-2.0 BSD ISC MIT MPL-2.0 Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64"

DEPEND="dev-libs/openssl:="

FILECAPS=( -m 755 'cap_net_bind_service=+ep' "usr/bin/${PN}" )

src_install() {
	cargo_src_install

	# The readme is literally "you can find the example file on github" and there's zero
	# documentation besides that, so for the sake of users' sanity, bundle them both here.
	dodoc "${S}/README.md"
	newdoc "${DISTDIR}/${P}_example.toml" config_example.toml
}