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

# Autogenerated by pycargoebuild 0.13.4

EAPI=8

CRATES="
	addr2line@0.24.2
	adler2@2.0.0
	adler32@1.2.0
	ahash@0.8.11
	aho-corasick@1.1.3
	alloc-no-stdlib@2.0.4
	alloc-stdlib@0.2.2
	allocator-api2@0.2.20
	anstyle@1.0.10
	anyhow@1.0.93
	arc-swap@1.7.1
	async-recursion@1.1.1
	async-trait@0.1.83
	atom_syndication@0.12.5
	autocfg@1.4.0
	backtrace@0.3.74
	base64@0.21.7
	base64@0.22.1
	bitflags@2.6.0
	block-buffer@0.10.4
	brotli-decompressor@4.0.1
	brotli@7.0.0
	bstr@1.11.0
	build_html@2.5.0
	bumpalo@3.16.0
	byteorder@1.5.0
	bytes@1.8.0
	cached@0.54.0
	cached_proc_macro@0.23.0
	cached_proc_macro_types@0.1.1
	cc@1.2.1
	cfg-if@1.0.0
	chrono@0.4.38
	clap@4.5.21
	clap_builder@4.5.21
	clap_derive@4.5.18
	clap_lex@0.7.3
	common-words-all@0.0.2
	cookie@0.18.1
	core-foundation-sys@0.8.7
	core-foundation@0.9.4
	core2@0.4.0
	cpufeatures@0.2.15
	crc32fast@1.4.2
	crypto-common@0.1.6
	csv-core@0.1.11
	csv@1.3.1
	darling@0.20.10
	darling_core@0.20.10
	darling_macro@0.20.10
	dary_heap@0.3.7
	deranged@0.3.11
	derive_builder@0.20.2
	derive_builder_core@0.20.2
	derive_builder_macro@0.20.2
	digest@0.10.7
	diligent-date-parser@0.1.5
	displaydoc@0.2.5
	dotenvy@0.15.7
	encoding_rs@0.8.35
	env_logger@0.10.2
	equivalent@1.0.1
	errno@0.3.9
	fastrand@2.2.0
	fnv@1.0.7
	form_urlencoded@1.2.1
	fs_extra@1.3.0
	futures-channel@0.3.31
	futures-core@0.3.31
	futures-io@0.3.31
	futures-lite@2.5.0
	futures-sink@0.3.31
	futures-task@0.3.31
	futures-util@0.3.31
	futures@0.3.31
	generic-array@0.14.7
	getrandom@0.2.15
	gimli@0.31.1
	glob@0.3.1
	globset@0.4.15
	h2@0.3.26
	hashbrown@0.14.5
	hashbrown@0.15.1
	heck@0.5.0
	hermit-abi@0.3.9
	hermit-abi@0.4.0
	http-body@0.4.6
	http@0.2.12
	httparse@1.9.5
	httpdate@1.0.3
	humantime@2.1.0
	hyper-rustls@0.24.2
	hyper@0.14.31
	icu_collections@1.5.0
	icu_locid@1.5.0
	icu_locid_transform@1.5.0
	icu_locid_transform_data@1.5.0
	icu_normalizer@1.5.0
	icu_normalizer_data@1.5.0
	icu_properties@1.5.1
	icu_properties_data@1.5.0
	icu_provider@1.5.0
	icu_provider_macros@1.5.0
	ident_case@1.0.1
	idna@1.0.3
	idna_adapter@1.2.0
	indexmap@2.6.0
	inventory@0.3.15
	is-terminal@0.4.13
	itoa@1.0.11
	js-sys@0.3.72
	libc@0.2.164
	libflate@2.1.0
	libflate_lz77@2.1.0
	linux-raw-sys@0.4.14
	lipsum@0.9.1
	litemap@0.7.3
	lock_api@0.4.12
	log@0.4.22
	memchr@2.7.4
	mime@0.3.17
	mime_guess@2.0.5
	minimal-lexical@0.2.1
	miniz_oxide@0.8.0
	mio@1.0.2
	never@0.1.0
	nom@7.1.3
	num-conv@0.1.0
	num-traits@0.2.19
	num_threads@0.1.7
	object@0.36.5
	once_cell@1.20.2
	openssl-probe@0.1.5
	parking@2.2.1
	parking_lot@0.12.3
	parking_lot_core@0.9.10
	percent-encoding@2.3.1
	pin-project-lite@0.2.15
	pin-utils@0.1.0
	powerfmt@0.2.0
	ppv-lite86@0.2.20
	pretty_env_logger@0.5.0
	proc-macro2@1.0.89
	quick-error@1.2.3
	quick-xml@0.37.1
	quote@1.0.37
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	redox_syscall@0.5.7
	regex-automata@0.4.9
	regex-syntax@0.8.5
	regex@1.11.1
	ring@0.17.8
	rinja@0.3.5
	rinja_derive@0.3.5
	rinja_parser@0.3.5
	rle-decode-fast@1.0.3
	route-recognizer@0.3.1
	rss@2.0.10
	rust-embed-impl@8.5.0
	rust-embed-utils@8.5.0
	rust-embed@8.5.0
	rustc-demangle@0.1.24
	rustc-hash@2.0.0
	rustix@0.38.41
	rustls-native-certs@0.6.3
	rustls-pemfile@1.0.4
	rustls-webpki@0.101.7
	rustls@0.21.12
	rusty-forkfork@0.4.0
	ryu@1.0.18
	same-file@1.0.6
	schannel@0.1.27
	scopeguard@1.2.0
	sct@0.7.1
	sealed_test@1.1.0
	sealed_test_derive@1.1.0
	security-framework-sys@2.12.1
	security-framework@2.11.1
	serde@1.0.215
	serde_derive@1.0.215
	serde_json@1.0.133
	serde_json_path@0.7.1
	serde_json_path_core@0.2.1
	serde_json_path_macros@0.1.5
	serde_json_path_macros_internal@0.1.2
	serde_spanned@0.6.8
	serde_urlencoded@0.7.1
	serde_yaml@0.9.34+deprecated
	sha2@0.10.8
	shlex@1.3.0
	signal-hook-registry@1.4.2
	slab@0.4.9
	smallvec@1.13.2
	socket2@0.5.7
	spin@0.9.8
	stable_deref_trait@1.2.0
	strsim@0.11.1
	syn@2.0.87
	synstructure@0.13.1
	tegen@0.1.4
	tempfile@3.14.0
	termcolor@1.4.1
	thiserror-impl@1.0.69
	thiserror@1.0.69
	time-core@0.1.2
	time-macros@0.2.18
	time@0.3.36
	tinystr@0.7.6
	tokio-macros@2.4.0
	tokio-rustls@0.24.1
	tokio-util@0.7.12
	tokio@1.41.1
	toml@0.8.19
	toml_datetime@0.6.8
	toml_edit@0.22.22
	tower-service@0.3.3
	tracing-core@0.1.32
	tracing@0.1.40
	try-lock@0.2.5
	typenum@1.17.0
	unicase@2.8.0
	unicode-ident@1.0.13
	unsafe-libyaml@0.2.11
	untrusted@0.9.0
	url@2.5.3
	utf16_iter@1.0.5
	utf8_iter@1.0.4
	uuid@1.11.0
	version_check@0.9.5
	wait-timeout@0.2.0
	walkdir@2.5.0
	want@0.3.1
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.95
	wasm-bindgen-macro-support@0.2.95
	wasm-bindgen-macro@0.2.95
	wasm-bindgen-shared@0.2.95
	wasm-bindgen@0.2.95
	web-time@1.1.0
	winapi-util@0.1.9
	windows-sys@0.52.0
	windows-sys@0.59.0
	windows-targets@0.52.6
	windows_aarch64_gnullvm@0.52.6
	windows_aarch64_msvc@0.52.6
	windows_i686_gnu@0.52.6
	windows_i686_gnullvm@0.52.6
	windows_i686_msvc@0.52.6
	windows_x86_64_gnu@0.52.6
	windows_x86_64_gnullvm@0.52.6
	windows_x86_64_msvc@0.52.6
	winnow@0.6.20
	write16@1.0.0
	writeable@0.5.5
	yoke-derive@0.7.4
	yoke@0.7.4
	zerocopy-derive@0.7.35
	zerocopy@0.7.35
	zerofrom-derive@0.1.4
	zerofrom@0.1.4
	zerovec-derive@0.10.3
	zerovec@0.10.4
"

inherit cargo

# Redlib kind stopped doing real releases
# They kinda sideload new binaries into the old release now

MY_COMMIT="d7ec07cd0d713fc308e1004663b0053db8f00a0f"

DESCRIPTION="Alternative private front-end to Reddit"
HOMEPAGE="https://github.com/redlib-org/redlib"
SRC_URI="https://github.com/redlib-org/redlib/archive/${MY_COMMIT}.tar.gz -> ${PF}.tar.gz
	${CARGO_CRATE_URIS}
"

S="${WORKDIR}/redlib-${MY_COMMIT}"

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

RDEPEND="acct-user/redlib
	acct-group/redlib"

src_install(){
	cargo_src_install
	newinitd "${FILESDIR}"/redlib.initd redlib
	doconfd "${FILESDIR}"/redlib
}