blob: 9f123c70fbb2c502249918e3d763110e1bc886dd [file] [log] [blame]
Brad Bishope42b3e32020-01-15 22:08:42 -05001SUMMARY = "The network configuration abstraction renderer"
2DESCRIPTION = "Netplan is a utility for easily configuring networking on a \
3linux system. You simply create a YAML description of the required network \
4interfaces and what each should be configured to do. From this description \
5Netplan will generate all the necessary configuration for your chosen renderer \
6tool."
7HOMEPAGE = "https://netplan.io"
8SECTION = "net/misc"
9
10LICENSE = "GPLv3"
11LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
12
13S = "${WORKDIR}/git"
14SRCREV = "5d22e9d22c4a3724d27b80b0cd9b898ae8f59d2b"
15PV = "0.98+git${SRCPV}"
16
17SRC_URI = " \
18 git://github.com/CanonicalLtd/netplan.git \
19"
20
Andrew Geissler2ee498a2020-05-29 15:52:06 -050021DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
22
Andrew Geissler82c905d2020-04-13 13:39:40 -050023RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid"
Brad Bishope42b3e32020-01-15 22:08:42 -050024
25inherit pkgconfig systemd
26
27TARGET_CC_ARCH += "${LDFLAGS}"
28
29EXTRA_OEMAKE = "generate"
30EXTRA_OEMAKE =+ "${@bb.utils.contains('DISTRO_FEATURES','systemd','netplan-dbus dbus/io.netplan.Netplan.service','',d)}"
31
32do_install() {
33 install -d ${D}${sbindir} ${D}${base_libdir}/netplan ${D}${datadir}/netplan/netplan/cli/commands ${D}${sysconfdir}/netplan
34 install -m 755 ${S}/generate ${D}${base_libdir}/netplan/
35 install -m 644 ${S}/netplan/*.py ${D}${datadir}/netplan/netplan
36 install -m 644 ${S}/netplan/cli/*.py ${D}${datadir}/netplan/netplan/cli
37 install -m 644 ${S}/netplan/cli/commands/*.py ${D}${datadir}/netplan/netplan/cli/commands
38 install -m 755 ${S}/src/netplan.script ${D}${datadir}/netplan/
39 ln -srf ${D}${datadir}/netplan/netplan.script ${D}${sbindir}/netplan
40
41 install -d ${D}/${systemd_unitdir}/system ${D}${systemd_unitdir}/system-generators
42 install -m 644 ${S}/src/netplan-wpa@.service ${D}${systemd_unitdir}/system/
43 ln -srf ${D}/${base_libdir}/netplan/generate ${D}${systemd_unitdir}/system-generators
44
45 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
46 install -d ${D}${datadir}/dbus-1/system.d ${D}${datadir}/dbus-1/system-services
47 install -m 755 ${S}/netplan-dbus ${D}${base_libdir}/netplan
48 install -m 644 ${S}/dbus/io.netplan.Netplan.conf ${D}${datadir}/dbus-1/system.d
49 install -m 644 ${S}/dbus/io.netplan.Netplan.service ${D}${datadir}/dbus-1/system-services
50 fi
51}
52
53SYSTEMD_SERVICE_${PN} = "netplan-wpa@.service"
54SYSTEMD_AUTO_ENABLE = "disable"
55
56PACKAGES += "${PN}-dbus"
57
58FILES_${PN} = "${sbindir} ${base_libdir}/netplan/generate ${datadir}/netplan ${sysconfdir}/netplan ${systemd_unitdir}"
59FILES_${PN}-dbus = "${base_libdir}/netplan/netplan-dbus ${datadir}/dbus-1"