diff options
Diffstat (limited to 'meta-networking/recipes-connectivity/netplan/netplan_0.101.bb')
-rw-r--r-- | meta-networking/recipes-connectivity/netplan/netplan_0.101.bb | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/netplan/netplan_0.101.bb b/meta-networking/recipes-connectivity/netplan/netplan_0.101.bb new file mode 100644 index 0000000000..a3afcd2d56 --- /dev/null +++ b/meta-networking/recipes-connectivity/netplan/netplan_0.101.bb | |||
@@ -0,0 +1,62 @@ | |||
1 | SUMMARY = "The network configuration abstraction renderer" | ||
2 | DESCRIPTION = "Netplan is a utility for easily configuring networking on a \ | ||
3 | linux system. You simply create a YAML description of the required network \ | ||
4 | interfaces and what each should be configured to do. From this description \ | ||
5 | Netplan will generate all the necessary configuration for your chosen renderer \ | ||
6 | tool." | ||
7 | HOMEPAGE = "https://netplan.io" | ||
8 | SECTION = "net/misc" | ||
9 | |||
10 | LICENSE = "GPLv3" | ||
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | SRCREV = "e445b87b9dff439ec564c245d030b03d61eb0f24" | ||
15 | PV = "0.101+git${SRCPV}" | ||
16 | |||
17 | SRC_URI = " \ | ||
18 | git://github.com/CanonicalLtd/netplan.git \ | ||
19 | file://0001-dbus-Remove-unused-variabes.patch \ | ||
20 | file://0002-Makefile-Exclude-.h-files-from-target-rule.patch \ | ||
21 | " | ||
22 | SRC_URI_append_libc-musl = " file://0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch" | ||
23 | |||
24 | DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | ||
25 | |||
26 | RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid libnetplan" | ||
27 | |||
28 | inherit pkgconfig systemd | ||
29 | |||
30 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
31 | |||
32 | EXTRA_OEMAKE = "generate netplan/_features.py" | ||
33 | EXTRA_OEMAKE =+ "${@bb.utils.contains('DISTRO_FEATURES','systemd','netplan-dbus dbus/io.netplan.Netplan.service','',d)}" | ||
34 | |||
35 | do_install() { | ||
36 | install -d ${D}${sbindir} ${D}${libdir} ${D}${base_libdir}/netplan ${D}${datadir}/netplan/netplan/cli/commands ${D}${sysconfdir}/netplan | ||
37 | install -m 755 ${S}/generate ${D}${base_libdir}/netplan/ | ||
38 | install -m 644 ${S}/netplan/*.py ${D}${datadir}/netplan/netplan | ||
39 | install -m 644 ${S}/netplan/cli/*.py ${D}${datadir}/netplan/netplan/cli | ||
40 | install -m 644 ${S}/netplan/cli/commands/*.py ${D}${datadir}/netplan/netplan/cli/commands | ||
41 | install -m 755 ${S}/src/netplan.script ${D}${datadir}/netplan/ | ||
42 | ln -srf ${D}${datadir}/netplan/netplan.script ${D}${sbindir}/netplan | ||
43 | |||
44 | install -d ${D}/${systemd_unitdir}/system ${D}${systemd_unitdir}/system-generators | ||
45 | ln -srf ${D}/${base_libdir}/netplan/generate ${D}${systemd_unitdir}/system-generators | ||
46 | |||
47 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
48 | install -d ${D}${datadir}/dbus-1/system.d ${D}${datadir}/dbus-1/system-services | ||
49 | install -m 755 ${S}/netplan-dbus ${D}${base_libdir}/netplan | ||
50 | install -m 644 ${S}/dbus/io.netplan.Netplan.conf ${D}${datadir}/dbus-1/system.d | ||
51 | install -m 644 ${S}/dbus/io.netplan.Netplan.service ${D}${datadir}/dbus-1/system-services | ||
52 | fi | ||
53 | |||
54 | install -m 755 ${S}/libnetplan.so.0.0 ${D}${libdir} | ||
55 | ln -rfs ${D}${libdir}/libnetplan.so.0.0 ${D}${libdir}/libnetplan.so | ||
56 | } | ||
57 | |||
58 | PACKAGES += "${PN}-dbus libnetplan" | ||
59 | |||
60 | FILES_libnetplan = "${libdir}/libnetplan.so.0.0" | ||
61 | FILES_${PN} = "${sbindir} ${base_libdir}/netplan/generate ${datadir}/netplan ${sysconfdir}/netplan ${systemd_unitdir}" | ||
62 | FILES_${PN}-dbus = "${base_libdir}/netplan/netplan-dbus ${datadir}/dbus-1" | ||