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

# Autogenerated by pycargoebuild 0.13.5

EAPI=8

CRATES="
"

inherit cargo systemd

DESCRIPTION="A Rust port of shadowsocks"
HOMEPAGE="https://shadowsocks.org"
SRC_URI="
	${CARGO_CRATE_URIS}
"
if [[ ${PKGBUMPING} != ${PVR} ]]; then
	SRC_URI+="
		https://github.com/shadowsocks/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
		https://github.com/denisstrizhkin/${PN}-crates/releases/download/${PV}/${PN}-${PV}-crates.tar.xz
	"
fi

LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
	0BSD Apache-2.0 BSD-2 BSD CC0-1.0 ISC MIT MPL-2.0 Unicode-3.0
	WTFPL-2
"
SLOT="0"
KEYWORDS="~amd64"

src_configure() {
	local myfeatures=(
		full
	)
	cargo_src_configure
}

src_install() {
	systemd_dounit debian/shadowsocks-rust-local@.service
	systemd_dounit debian/shadowsocks-rust-server@.service
	cargo_src_install
}
