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

# Autogenerated by pycargoebuild 0.15.0

EAPI=8

CRATES="
	actix-codec@0.5.2
	actix-http@3.9.0
	actix-macros@0.2.4
	actix-router@0.5.3
	actix-rt@2.10.0
	actix-server@2.5.0
	actix-service@2.0.2
	actix-utils@3.0.1
	actix-web-codegen@4.3.0
	actix-web@4.9.0
	addr2line@0.24.2
	adler2@2.0.0
	ahash@0.8.11
	aho-corasick@1.1.3
	alloc-no-stdlib@2.0.4
	alloc-stdlib@0.2.2
	anstream@0.6.18
	anstyle-parse@0.2.6
	anstyle-query@1.1.2
	anstyle-wincon@3.0.8
	anstyle@1.0.10
	anyhow@1.0.98
	autocfg@1.4.0
	backtrace@0.3.74
	base64@0.22.1
	bitflags@1.3.2
	bitflags@2.8.0
	block-buffer@0.10.4
	brotli-decompressor@4.0.2
	brotli@6.0.0
	bumpalo@3.17.0
	byteorder@1.5.0
	bytes@1.9.0
	bytestring@1.4.0
	cc@1.2.10
	cfg-if@1.0.0
	clap@4.5.39
	clap_builder@4.5.39
	clap_derive@4.5.32
	clap_lex@0.7.4
	colorchoice@1.0.3
	convert_case@0.4.0
	cookie@0.16.2
	cpufeatures@0.2.17
	crc32fast@1.4.2
	crypto-common@0.1.6
	daemonizr@0.1.6
	deranged@0.3.11
	derive_more@0.99.18
	digest@0.10.7
	displaydoc@0.2.5
	encoding_rs@0.8.35
	env_filter@0.1.3
	env_logger@0.11.8
	equivalent@1.0.1
	flate2@1.0.35
	fnv@1.0.7
	form_urlencoded@1.2.1
	futures-channel@0.3.31
	futures-core@0.3.31
	futures-io@0.3.31
	futures-macro@0.3.31
	futures-sink@0.3.31
	futures-task@0.3.31
	futures-util@0.3.31
	generic-array@0.14.7
	getrandom@0.2.15
	gimli@0.31.1
	h2@0.3.26
	hashbrown@0.15.2
	heck@0.5.0
	http-body-util@0.1.2
	http-body@1.0.1
	http@0.2.12
	http@1.2.0
	httparse@1.10.0
	httpdate@1.0.3
	hyper-util@0.1.10
	hyper@1.6.0
	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
	idna@1.0.3
	idna_adapter@1.2.0
	impl-more@0.1.9
	indexmap@2.7.1
	ipnet@2.11.0
	is_terminal_polyfill@1.70.1
	itoa@1.0.14
	jiff-static@0.2.14
	jiff@0.2.14
	jobserver@0.1.32
	js-sys@0.3.77
	language-tags@0.3.2
	libc@0.2.169
	litemap@0.7.4
	local-channel@0.1.5
	local-waker@0.1.4
	lock_api@0.4.12
	log@0.4.27
	memchr@2.7.4
	memoffset@0.7.1
	mime@0.3.17
	miniz_oxide@0.8.3
	mio@1.0.3
	nix@0.26.4
	num-conv@0.1.0
	object@0.36.7
	once_cell@1.20.2
	once_cell_polyfill@1.70.1
	parking_lot@0.12.3
	parking_lot_core@0.9.10
	paste@1.0.15
	percent-encoding@2.3.1
	pin-project-lite@0.2.16
	pin-utils@0.1.0
	pkg-config@0.3.31
	portable-atomic-util@0.2.4
	portable-atomic@1.11.0
	powerfmt@0.2.0
	ppv-lite86@0.2.20
	proc-macro2@1.0.93
	quote@1.0.38
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	redox_syscall@0.5.8
	regex-automata@0.4.9
	regex-lite@0.1.6
	regex-syntax@0.8.5
	regex@1.11.1
	reqwest@0.12.12
	rustc-demangle@0.1.24
	rustc_version@0.4.1
	rustversion@1.0.19
	ryu@1.0.19
	scopeguard@1.2.0
	semver@1.0.25
	serde@1.0.219
	serde_derive@1.0.219
	serde_json@1.0.138
	serde_urlencoded@0.7.1
	sha1@0.10.6
	shlex@1.3.0
	signal-hook-registry@1.4.2
	slab@0.4.9
	smallvec@1.13.2
	socket2@0.5.8
	stable_deref_trait@1.2.0
	strsim@0.11.1
	syn@2.0.101
	sync_wrapper@1.0.2
	synstructure@0.13.1
	time-core@0.1.2
	time-macros@0.2.19
	time@0.3.37
	tinystr@0.7.6
	tokio-macros@2.5.0
	tokio-stream@0.1.17
	tokio-util@0.7.13
	tokio@1.43.0
	tower-layer@0.3.3
	tower-service@0.3.3
	tower@0.5.2
	tracing-core@0.1.33
	tracing@0.1.41
	try-lock@0.2.5
	typenum@1.17.0
	unicode-ident@1.0.16
	url@2.5.4
	utf16_iter@1.0.5
	utf8_iter@1.0.4
	utf8parse@0.2.2
	version_check@0.9.5
	want@0.3.1
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.100
	wasm-bindgen-futures@0.4.50
	wasm-bindgen-macro-support@0.2.100
	wasm-bindgen-macro@0.2.100
	wasm-bindgen-shared@0.2.100
	wasm-bindgen@0.2.100
	wasm-streams@0.4.2
	web-sys@0.3.77
	windows-registry@0.2.0
	windows-result@0.2.0
	windows-strings@0.1.0
	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
	write16@1.0.0
	writeable@0.5.5
	yoke-derive@0.7.5
	yoke@0.7.5
	zerocopy-derive@0.7.35
	zerocopy@0.7.35
	zerofrom-derive@0.1.5
	zerofrom@0.1.5
	zerovec-derive@0.10.3
	zerovec@0.10.4
	zstd-safe@7.2.1
	zstd-sys@2.0.13+zstd.1.5.6
	zstd@0.13.2
"

inherit systemd
inherit cargo

DESCRIPTION="Ollama over LAN"
HOMEPAGE="https://github.com/grouzen/ollana"
SRC_URI="
	https://github.com/grouzen/ollana/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="MIT"
# Dependent crate licenses
LICENSE+=" Apache-2.0 BSD MIT Unicode-3.0"
SLOT="0"
KEYWORDS="~amd64"

DEPEND="
        acct-user/ollana
        acct-group/ollana
        "

RDEPEND="${DEPEND}"

src_install() {
	cargo_src_install

	elog "installing init services"
	newinitd "${FILESDIR}/ollana.initd" "ollana"
	systemd_dounit "${FILESDIR}/ollana.service"
}