gentoo-overlay/net-misc/netplan/netplan-1.1.1.ebuild

80 lines
1.7 KiB
Bash
Raw Normal View History

2022-09-28 14:40:28 +03:00
# Copyright 1999-2022 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
2024-10-23 17:05:52 +03:00
EAPI=8
2022-09-28 14:40:28 +03:00
2024-10-23 17:05:52 +03:00
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=no
PYTHON_COMPAT=( python3_{10..13} pypy3 )
inherit meson distutils-r1
2022-09-28 14:40:28 +03:00
DESCRIPTION="Backend-agnostic network configuration in YAML"
HOMEPAGE="https://netplan.io/"
SRC_URI="https://github.com/CanonicalLtd/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
2024-10-23 17:05:52 +03:00
IUSE="examples +systemd +bash-completion test lto"
2022-09-28 14:40:28 +03:00
REQUIRED_USE="systemd bash-completion"
DEPEND=">=dev-libs/glib-2.64.3
>=dev-libs/libyaml-0.2.5
sys-apps/util-linux
doc? ( >=app-text/pandoc-1.19.2.1-r1 )
"
BDEPEND="${DEPEND}
dev-python/pytest
dev-python/pyflakes
2023-05-25 09:56:07 +03:00
dev-python/coverage
2024-10-23 17:05:52 +03:00
dev-python/jaraco-text
2024-10-25 07:33:16 +03:00
dev-python/pycodestyle
test? ( dev-util/cmocka )
2022-09-28 14:40:28 +03:00
"
RDEPEND=">=dev-python/netifaces-0.10.9
>=dev-libs/libyaml-0.2.5
>=dev-python/pyyaml-5.3.1
2023-05-25 09:56:07 +03:00
dev-python/rich
2024-10-23 17:05:52 +03:00
sys-apps/systemd
app-shells/bash-completion
2022-09-28 14:40:28 +03:00
"
PATCHES=(
2023-05-25 09:56:07 +03:00
"${FILESDIR}/0001-build-add-Gentoo-compat.patch"
2022-09-28 14:40:28 +03:00
)
2023-05-25 09:56:07 +03:00
2024-10-23 17:05:52 +03:00
distutils_enable_sphinx doc
python_configure() {
2023-05-25 09:56:07 +03:00
local emesonargs=(
$(meson_use test unit_testing)
$(meson_use test b_coverage)
2024-10-23 17:05:52 +03:00
$(meson_use lto b_lto)
2023-05-25 09:56:07 +03:00
)
meson_src_configure
}
2024-10-23 17:05:52 +03:00
python_compile() {
meson_src_compile
}
python_install() {
meson_src_install
python_optimize
}
python_install_all() {
distutils-r1_python_install_all
if use examples; then
dodoc -r examples
fi
rm -rf "${D}"/usr/share/doc/netplan
}