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

# Autogenerated by pycargoebuild 0.13.3

EAPI=8

CRATES="
	addr2line@0.22.0
	adler@1.0.2
	aho-corasick@1.1.3
	anstream@0.6.15
	anstyle-parse@0.2.5
	anstyle-query@1.1.1
	anstyle-wincon@3.0.4
	anstyle@1.0.8
	anyhow@1.0.86
	async-trait@0.1.81
	atty@0.2.14
	autocfg@1.3.0
	backtrace@0.3.73
	base64@0.22.1
	bitflags@1.3.2
	bitflags@2.6.0
	byteorder@1.5.0
	bytes@1.7.1
	cc@1.1.10
	cfg-if@1.0.0
	clap@3.2.25
	clap_derive@3.2.25
	clap_lex@0.2.4
	colorchoice@1.0.2
	daemonize@0.5.0
	data-encoding@2.6.0
	enum-as-inner@0.6.0
	env_filter@0.1.2
	env_logger@0.11.5
	form_urlencoded@1.2.1
	futures-channel@0.3.30
	futures-core@0.3.30
	futures-io@0.3.30
	futures-task@0.3.30
	futures-util@0.3.30
	getrandom@0.2.15
	gimli@0.29.0
	hashbrown@0.12.3
	heck@0.4.1
	hermit-abi@0.1.19
	hermit-abi@0.3.9
	hostname@0.3.1
	humantime@2.1.0
	idna@0.4.0
	idna@0.5.0
	indexmap@1.9.3
	ipconfig@0.3.2
	ipnet@2.9.0
	is_terminal_polyfill@1.70.1
	libc@0.2.155
	linked-hash-map@0.5.6
	lock_api@0.4.12
	log@0.4.22
	lru-cache@0.1.2
	match_cfg@0.1.0
	memchr@2.7.4
	miniz_oxide@0.7.4
	minreq@2.12.0
	mio@1.0.2
	object@0.36.3
	once_cell@1.19.0
	os_str_bytes@6.6.1
	parking_lot@0.12.3
	parking_lot_core@0.9.10
	percent-encoding@2.3.1
	pin-project-lite@0.2.14
	pin-utils@0.1.0
	ppv-lite86@0.2.20
	proc-macro-error-attr@1.0.4
	proc-macro-error@1.0.4
	proc-macro2@1.0.86
	quick-error@1.2.3
	quote@1.0.36
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	redox_syscall@0.5.3
	regex-automata@0.4.7
	regex-syntax@0.8.4
	regex@1.10.6
	resolv-conf@0.7.0
	ring@0.17.8
	rustc-demangle@0.1.24
	rustls-webpki@0.101.7
	rustls@0.21.12
	scopeguard@1.2.0
	sct@0.7.1
	slab@0.4.9
	smallvec@1.13.2
	socket2@0.5.7
	spin@0.9.8
	strsim@0.10.0
	syn@1.0.109
	syn@2.0.74
	termcolor@1.4.1
	textwrap@0.16.1
	thiserror-impl@1.0.63
	thiserror@1.0.63
	tinyvec@1.8.0
	tinyvec_macros@0.1.1
	tokio@1.39.2
	tracing-attributes@0.1.27
	tracing-core@0.1.32
	tracing@0.1.40
	trust-dns-proto@0.23.2
	trust-dns-resolver@0.23.2
	unicode-bidi@0.3.15
	unicode-ident@1.0.12
	unicode-normalization@0.1.23
	untrusted@0.9.0
	url@2.5.2
	utf8parse@0.2.2
	version_check@0.9.5
	wasi@0.11.0+wasi-snapshot-preview1
	webpki-roots@0.25.4
	widestring@1.1.0
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.9
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-sys@0.59.0
	windows-targets@0.48.5
	windows-targets@0.52.6
	windows_aarch64_gnullvm@0.48.5
	windows_aarch64_gnullvm@0.52.6
	windows_aarch64_msvc@0.48.5
	windows_aarch64_msvc@0.52.6
	windows_i686_gnu@0.48.5
	windows_i686_gnu@0.52.6
	windows_i686_gnullvm@0.52.6
	windows_i686_msvc@0.48.5
	windows_i686_msvc@0.52.6
	windows_x86_64_gnu@0.48.5
	windows_x86_64_gnu@0.52.6
	windows_x86_64_gnullvm@0.48.5
	windows_x86_64_gnullvm@0.52.6
	windows_x86_64_msvc@0.48.5
	windows_x86_64_msvc@0.52.6
	winreg@0.50.0
	zerocopy-derive@0.7.35
	zerocopy@0.7.35
"

inherit cargo systemd

DESCRIPTION="No-IP Dynamic Update Client (https://www.noip.com)"
HOMEPAGE="https://www.noip.com"
SRC_URI="
	${CARGO_CRATE_URIS}
	https://dmej8g5cpdyqd.cloudfront.net/downloads/noip-duc_${PV}.tar.gz
"
S="${WORKDIR}/noip-duc_${PV}"

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

src_install() {
	default
	cargo_src_install

	sed -i "s/ auditd.service//g" "${S}/debian/service" || die
	systemd_newunit "${S}/debian/service" "noip-duc.service"
	dodir /etc/default
	touch "${ED}"/etc/default/noip-duc || die
	chmod 0644 "${ED}"/etc/default/noip-duc || die
}
