summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/connman/connman.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/connman/connman.inc')
-rw-r--r--meta/recipes-connectivity/connman/connman.inc110
1 files changed, 60 insertions, 50 deletions
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 776bbfbff2..7487ca0d0c 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -9,12 +9,14 @@ configuration methods, like DHCP and domain name resolving, are \
9implemented using plug-ins." 9implemented using plug-ins."
10HOMEPAGE = "http://connman.net/" 10HOMEPAGE = "http://connman.net/"
11BUGTRACKER = "https://01.org/jira/browse/CM" 11BUGTRACKER = "https://01.org/jira/browse/CM"
12LICENSE = "GPLv2" 12LICENSE = "GPL-2.0-only"
13LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ 13LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
14 file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" 14 file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36"
15 15
16inherit autotools pkgconfig systemd update-rc.d update-alternatives 16inherit autotools pkgconfig systemd update-rc.d update-alternatives
17 17
18CVE_PRODUCT = "connman connection_manager"
19
18DEPENDS = "dbus glib-2.0 ppp" 20DEPENDS = "dbus glib-2.0 ppp"
19 21
20EXTRA_OECONF += "\ 22EXTRA_OECONF += "\
@@ -25,21 +27,29 @@ EXTRA_OECONF += "\
25 --enable-ethernet \ 27 --enable-ethernet \
26 --enable-tools \ 28 --enable-tools \
27 --disable-polkit \ 29 --disable-polkit \
30 --runstatedir=/run \
28" 31"
32# For smooth operation it would be best to start only one wireless daemon at a time.
33# If wpa-supplicant is running, connman will use it preferentially.
34# Select either wpa-supplicant or iwd
35WIRELESS_DAEMON ??= "wpa-supplicant"
29 36
30PACKAGECONFIG ??= "wispr iptables client\ 37PACKAGECONFIG ??= "wispr iptables client\
31 ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \ 38 ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \
32 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ 39 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
40 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \
33" 41"
34 42
35# If you want ConnMan to support VPN, add following statement into 43# If you want ConnMan to support VPN, add following statement into
36# local.conf or distro config 44# local.conf or distro config
37# PACKAGECONFIG_append_pn-connman = " openvpn vpnc l2tp pptp" 45# PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp"
38 46
39PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" 47PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''"
40PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant, wpa-supplicant" 48PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi"
41PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" 49PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5"
42PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" 50PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono"
51PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant"
52PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd"
43PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," 53PACKAGECONFIG[tist] = "--enable-tist,--disable-tist,"
44PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" 54PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn"
45PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" 55PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc"
@@ -64,16 +74,16 @@ python __anonymous () {
64 d.setVar('SYSTEMD_PACKAGES', systemd_packages) 74 d.setVar('SYSTEMD_PACKAGES', systemd_packages)
65} 75}
66 76
67SYSTEMD_SERVICE_${PN} = "connman.service" 77SYSTEMD_SERVICE:${PN} = "connman.service"
68SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service" 78SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service"
69SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service" 79SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service"
70 80
71ALTERNATIVE_PRIORITY = "100" 81ALTERNATIVE_PRIORITY = "100"
72ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" 82ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}"
73ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}" 83ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}"
74ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" 84ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
75 85
76do_install_append() { 86do_install:append() {
77 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then 87 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
78 install -d ${D}${sysconfdir}/init.d 88 install -d ${D}${sysconfdir}/init.d
79 install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman 89 install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman
@@ -100,7 +110,7 @@ do_install_append() {
100} 110}
101 111
102# These used to be plugins, but now they are core 112# These used to be plugins, but now they are core
103RPROVIDES_${PN} = "\ 113RPROVIDES:${PN} = "\
104 connman-plugin-loopback \ 114 connman-plugin-loopback \
105 connman-plugin-ethernet \ 115 connman-plugin-ethernet \
106 ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \ 116 ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \
@@ -108,7 +118,7 @@ RPROVIDES_${PN} = "\
108 ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \ 118 ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \
109 " 119 "
110 120
111RDEPENDS_${PN} = "\ 121RDEPENDS:${PN} = "\
112 dbus \ 122 dbus \
113 " 123 "
114 124
@@ -119,11 +129,11 @@ def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip):
119 if plugintype in depmap: 129 if plugintype in depmap:
120 rdepends = map(lambda x: multilib_prefix + x, \ 130 rdepends = map(lambda x: multilib_prefix + x, \
121 depmap[plugintype].split()) 131 depmap[plugintype].split())
122 d.setVar("RDEPENDS_%s" % pkg, " ".join(rdepends)) 132 d.setVar("RDEPENDS:%s" % pkg, " ".join(rdepends))
123 if add_insane_skip: 133 if add_insane_skip:
124 d.appendVar("INSANE_SKIP_%s" % pkg, "dev-so") 134 d.appendVar("INSANE_SKIP:%s" % pkg, "dev-so")
125 135
126python populate_packages_prepend() { 136python populate_packages:prepend() {
127 depmap = dict(pppd="ppp") 137 depmap = dict(pppd="ppp")
128 multilib_prefix = (d.getVar("MLPREFIX") or "") 138 multilib_prefix = (d.getVar("MLPREFIX") or "")
129 139
@@ -144,72 +154,72 @@ python populate_packages_prepend() {
144 154
145PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" 155PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
146 156
147FILES_${PN}-tools = "${bindir}/wispr" 157FILES:${PN}-tools = "${bindir}/wispr"
148RDEPENDS_${PN}-tools ="${PN}" 158RDEPENDS:${PN}-tools ="${PN}"
149 159
150FILES_${PN}-tests = "${bindir}/*-test" 160FILES:${PN}-tests = "${bindir}/*-test"
151 161
152FILES_${PN}-client = "${bindir}/connmanctl" 162FILES:${PN}-client = "${bindir}/connmanctl"
153RDEPENDS_${PN}-client ="${PN}" 163RDEPENDS:${PN}-client ="${PN}"
154 164
155FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ 165FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
156 ${libdir}/connman/plugins \ 166 ${libdir}/connman/plugins \
157 ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \ 167 ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \
158 ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ 168 ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
159 ${datadir}/dbus-1/system-services/* \ 169 ${datadir}/dbus-1/system-services/* \
160 ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf" 170 ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf"
161 171
162FILES_${PN}-dev += "${libdir}/connman/*/*.la" 172FILES:${PN}-dev += "${libdir}/connman/*/*.la"
163 173
164PACKAGES =+ "${PN}-vpn ${PN}-wait-online" 174PACKAGES =+ "${PN}-vpn ${PN}-wait-online"
165 175
166SUMMARY_${PN}-vpn = "A daemon for managing VPN connections within embedded devices" 176SUMMARY:${PN}-vpn = "A daemon for managing VPN connections within embedded devices"
167DESCRIPTION_${PN}-vpn = "The ConnMan VPN provides a daemon for \ 177DESCRIPTION:${PN}-vpn = "The ConnMan VPN provides a daemon for \
168managing VPN connections within embedded devices running the Linux \ 178managing VPN connections within embedded devices running the Linux \
169operating system. The connman-vpnd handles all the VPN connections \ 179operating system. The connman-vpnd handles all the VPN connections \
170and starts/stops VPN client processes when necessary. The connman-vpnd \ 180and starts/stops VPN client processes when necessary. The connman-vpnd \
171provides a DBus API for managing VPN connections. All the different \ 181provides a DBus API for managing VPN connections. All the different \
172VPN technogies are implemented using plug-ins." 182VPN technogies are implemented using plug-ins."
173FILES_${PN}-vpn += "${sbindir}/connman-vpnd \ 183FILES:${PN}-vpn += "${sbindir}/connman-vpnd \
174 ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \ 184 ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \
175 ${datadir}/dbus-1/system-services/net.connman.vpn.service \ 185 ${datadir}/dbus-1/system-services/net.connman.vpn.service \
176 ${systemd_unitdir}/system/connman-vpn.service" 186 ${systemd_system_unitdir}/connman-vpn.service"
177 187
178SUMMARY_${PN}-wait-online = "A program that will return once ConnMan has connected to a network" 188SUMMARY:${PN}-wait-online = "A program that will return once ConnMan has connected to a network"
179DESCRIPTION_${PN}-wait-online = "A service that can be enabled so that \ 189DESCRIPTION:${PN}-wait-online = "A service that can be enabled so that \
180the system waits until a network connection is established." 190the system waits until a network connection is established."
181FILES_${PN}-wait-online += "${sbindir}/connmand-wait-online \ 191FILES:${PN}-wait-online += "${sbindir}/connmand-wait-online \
182 ${systemd_unitdir}/system/connman-wait-online.service" 192 ${systemd_system_unitdir}/connman-wait-online.service"
183 193
184SUMMARY_${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN" 194SUMMARY:${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN"
185DESCRIPTION_${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \ 195DESCRIPTION:${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \
186to create a VPN connection to OpenVPN server." 196to create a VPN connection to OpenVPN server."
187FILES_${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \ 197FILES:${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \
188 ${libdir}/connman/plugins-vpn/openvpn.so" 198 ${libdir}/connman/plugins-vpn/openvpn.so"
189RDEPENDS_${PN}-plugin-vpn-openvpn += "${PN}-vpn" 199RDEPENDS:${PN}-plugin-vpn-openvpn += "${PN}-vpn"
190RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}" 200RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}"
191 201
192SUMMARY_${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN" 202SUMMARY:${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN"
193DESCRIPTION_${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \ 203DESCRIPTION:${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \
194to create a VPN connection to Cisco3000 VPN Concentrator." 204to create a VPN connection to Cisco3000 VPN Concentrator."
195FILES_${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \ 205FILES:${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \
196 ${libdir}/connman/plugins-vpn/vpnc.so \ 206 ${libdir}/connman/plugins-vpn/vpnc.so \
197 ${libdir}/connman/scripts/vpn-script" 207 ${libdir}/connman/scripts/vpn-script"
198RDEPENDS_${PN}-plugin-vpn-vpnc += "${PN}-vpn" 208RDEPENDS:${PN}-plugin-vpn-vpnc += "${PN}-vpn"
199RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}" 209RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}"
200 210
201SUMMARY_${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN" 211SUMMARY:${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN"
202DESCRIPTION_${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \ 212DESCRIPTION:${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \
203to create a VPN connection to L2TP server." 213to create a VPN connection to L2TP server."
204FILES_${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \ 214FILES:${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \
205 ${libdir}/connman/plugins-vpn/l2tp.so" 215 ${libdir}/connman/plugins-vpn/l2tp.so"
206RDEPENDS_${PN}-plugin-vpn-l2tp += "${PN}-vpn" 216RDEPENDS:${PN}-plugin-vpn-l2tp += "${PN}-vpn"
207RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}" 217RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}"
208 218
209SUMMARY_${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN" 219SUMMARY:${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN"
210DESCRIPTION_${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \ 220DESCRIPTION:${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \
211to create a VPN connection to PPTP server." 221to create a VPN connection to PPTP server."
212FILES_${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \ 222FILES:${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \
213 ${libdir}/connman/plugins-vpn/pptp.so" 223 ${libdir}/connman/plugins-vpn/pptp.so"
214RDEPENDS_${PN}-plugin-vpn-pptp += "${PN}-vpn" 224RDEPENDS:${PN}-plugin-vpn-pptp += "${PN}-vpn"
215RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}" 225RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}"