Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 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" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame^] | 14 | SRCREV = "62701436991e42606c4e9e8dbdcdc5067d64f69b" |
| 15 | PV = "0.102+git${SRCPV}" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 16 | |
| 17 | SRC_URI = " \ |
| 18 | git://github.com/CanonicalLtd/netplan.git \ |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame^] | 19 | file://0001-Handle-enum-element-override.patch \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 20 | " |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 21 | SRC_URI_append_libc-musl = " file://0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 22 | |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 23 | DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
| 24 | |
Andrew Geissler | d221e03 | 2020-07-10 16:13:21 -0500 | [diff] [blame] | 25 | RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid libnetplan" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 26 | |
| 27 | inherit pkgconfig systemd |
| 28 | |
| 29 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 30 | |
Andrew Geissler | d221e03 | 2020-07-10 16:13:21 -0500 | [diff] [blame] | 31 | EXTRA_OEMAKE = "generate netplan/_features.py" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 32 | EXTRA_OEMAKE =+ "${@bb.utils.contains('DISTRO_FEATURES','systemd','netplan-dbus dbus/io.netplan.Netplan.service','',d)}" |
| 33 | |
| 34 | do_install() { |
Andrew Geissler | d221e03 | 2020-07-10 16:13:21 -0500 | [diff] [blame] | 35 | install -d ${D}${sbindir} ${D}${libdir} ${D}${base_libdir}/netplan ${D}${datadir}/netplan/netplan/cli/commands ${D}${sysconfdir}/netplan |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 36 | install -m 755 ${S}/generate ${D}${base_libdir}/netplan/ |
| 37 | install -m 644 ${S}/netplan/*.py ${D}${datadir}/netplan/netplan |
| 38 | install -m 644 ${S}/netplan/cli/*.py ${D}${datadir}/netplan/netplan/cli |
| 39 | install -m 644 ${S}/netplan/cli/commands/*.py ${D}${datadir}/netplan/netplan/cli/commands |
| 40 | install -m 755 ${S}/src/netplan.script ${D}${datadir}/netplan/ |
| 41 | ln -srf ${D}${datadir}/netplan/netplan.script ${D}${sbindir}/netplan |
| 42 | |
| 43 | install -d ${D}/${systemd_unitdir}/system ${D}${systemd_unitdir}/system-generators |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 44 | ln -srf ${D}/${base_libdir}/netplan/generate ${D}${systemd_unitdir}/system-generators |
| 45 | |
| 46 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 47 | install -d ${D}${datadir}/dbus-1/system.d ${D}${datadir}/dbus-1/system-services |
| 48 | install -m 755 ${S}/netplan-dbus ${D}${base_libdir}/netplan |
| 49 | install -m 644 ${S}/dbus/io.netplan.Netplan.conf ${D}${datadir}/dbus-1/system.d |
| 50 | install -m 644 ${S}/dbus/io.netplan.Netplan.service ${D}${datadir}/dbus-1/system-services |
| 51 | fi |
Andrew Geissler | d221e03 | 2020-07-10 16:13:21 -0500 | [diff] [blame] | 52 | |
| 53 | install -m 755 ${S}/libnetplan.so.0.0 ${D}${libdir} |
| 54 | ln -rfs ${D}${libdir}/libnetplan.so.0.0 ${D}${libdir}/libnetplan.so |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 55 | } |
| 56 | |
Andrew Geissler | d221e03 | 2020-07-10 16:13:21 -0500 | [diff] [blame] | 57 | PACKAGES += "${PN}-dbus libnetplan" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 58 | |
Andrew Geissler | d221e03 | 2020-07-10 16:13:21 -0500 | [diff] [blame] | 59 | FILES_libnetplan = "${libdir}/libnetplan.so.0.0" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 60 | FILES_${PN} = "${sbindir} ${base_libdir}/netplan/generate ${datadir}/netplan ${sysconfdir}/netplan ${systemd_unitdir}" |
| 61 | FILES_${PN}-dbus = "${base_libdir}/netplan/netplan-dbus ${datadir}/dbus-1" |