summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2025-04-02 16:02:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-04-03 11:06:20 +0100
commitfbecb1dc200455781eb44e01aced458c9bfe3156 (patch)
treea0c3e5dcc6e97aa8be1c1e3ba54303c8b15f6f93 /meta
parent5b2c3874f2b680cc3680fe32069bb242e31df252 (diff)
downloadpoky-fbecb1dc200455781eb44e01aced458c9bfe3156.tar.gz
connman: Merge .inc into .bb
No functional changes. (From OE-Core rev: dc0540aaad680b495c5e51f3926db26028c00a42) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/connman/connman.inc221
-rw-r--r--meta/recipes-connectivity/connman/connman_1.44.bb223
2 files changed, 221 insertions, 223 deletions
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
deleted file mode 100644
index 804c2db9a7..0000000000
--- a/meta/recipes-connectivity/connman/connman.inc
+++ /dev/null
@@ -1,221 +0,0 @@
1SUMMARY = "A daemon for managing internet connections within embedded devices"
2DESCRIPTION = "The ConnMan project provides a daemon for managing \
3internet connections within embedded devices running the Linux \
4operating system. The Connection Manager is designed to be slim and \
5to use as few resources as possible, so it can be easily integrated. \
6It is a fully modular system that can be extended, through plug-ins, \
7to support all kinds of wired or wireless technologies. Also, \
8configuration methods, like DHCP and domain name resolving, are \
9implemented using plug-ins."
10HOMEPAGE = "http://connman.net/"
11BUGTRACKER = "https://01.org/jira/browse/CM"
12LICENSE = "GPL-2.0-only"
13LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
14 file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36"
15
16inherit autotools pkgconfig systemd update-rc.d update-alternatives
17
18CVE_PRODUCT = "connman connection_manager"
19
20DEPENDS = "dbus glib-2.0 ppp"
21
22EXTRA_OECONF += "\
23 ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \
24 ac_cv_path_PPPD=${sbindir}/pppd \
25 --enable-debug \
26 --enable-loopback \
27 --enable-ethernet \
28 --enable-tools \
29 --disable-polkit \
30 --runstatedir=/run \
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"
36
37PACKAGECONFIG ??= "wispr iptables client\
38 ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \
39 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
40 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \
41"
42
43# If you want ConnMan to support VPN, add following statement into
44# local.conf or distro config
45# PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp"
46
47PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''"
48PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi"
49PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5"
50PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono"
51PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant"
52PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd"
53PACKAGECONFIG[tist] = "--enable-tist,--disable-tist,"
54PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn"
55PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc"
56PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd"
57PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
58# WISPr support for logging into hotspots, requires TLS
59PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
60PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-masq-ipv4 kernel-module-nft-nat"
61PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"
62PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard"
63PACKAGECONFIG[client] = "--enable-client,--disable-client,readline"
64PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl"
65
66INITSCRIPT_NAME = "connman"
67INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
68
69python __anonymous () {
70 systemd_packages = "${PN} ${PN}-wait-online"
71 pkgconfig = d.getVar('PACKAGECONFIG')
72 if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
73 systemd_packages += " ${PN}-vpn"
74 d.setVar('SYSTEMD_PACKAGES', systemd_packages)
75}
76
77SYSTEMD_SERVICE:${PN} = "connman.service"
78SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service"
79SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service"
80
81ALTERNATIVE_PRIORITY = "100"
82ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}"
83ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}"
84ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
85
86do_install:append() {
87 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
88 install -d ${D}${sysconfdir}/init.d
89 install -m 0755 ${UNPACKDIR}/connman ${D}${sysconfdir}/init.d/connman
90 sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman
91 fi
92
93 install -d ${D}${bindir}
94 install -m 0755 ${B}/tools/*-test ${D}${bindir}
95 if [ -e ${B}/tools/wispr ]; then
96 install -m 0755 ${B}/tools/wispr ${D}${bindir}
97 fi
98
99 # We don't need to package an empty directory
100 rmdir --ignore-fail-on-non-empty ${D}${libdir}/connman/scripts
101
102 # Automake 1.12 won't install empty directories, but we need the
103 # plugins directory to be present for ownership
104 mkdir -p ${D}${libdir}/connman/plugins
105
106 # For read-only filesystem, do not create links during bootup
107 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
108 ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman
109 fi
110}
111
112# These used to be plugins, but now they are core
113RPROVIDES:${PN} = "\
114 connman-plugin-loopback \
115 connman-plugin-ethernet \
116 ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \
117 ${@bb.utils.contains('PACKAGECONFIG', 'wifi','connman-plugin-wifi', '', d)} \
118 ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \
119 "
120
121PACKAGES_DYNAMIC += "^${PN}-plugin-.*"
122
123def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip):
124 plugintype = pkg.split( '-' )[-1]
125 if plugintype in depmap:
126 rdepends = map(lambda x: multilib_prefix + x, \
127 depmap[plugintype].split())
128 d.setVar("RDEPENDS:%s" % pkg, " ".join(rdepends))
129 if add_insane_skip:
130 d.appendVar("INSANE_SKIP:%s" % pkg, "dev-so")
131
132python populate_packages:prepend() {
133 depmap = dict(pppd="ppp")
134 multilib_prefix = (d.getVar("MLPREFIX") or "")
135
136 hook = lambda file,pkg,x,y,z: \
137 add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False)
138 plugin_dir = d.expand('${libdir}/connman/plugins/')
139 plugin_name = d.expand('${PN}-plugin-%s')
140 do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
141 '${PN} plugin for %s', extra_depends='', hook=hook, prepend=True )
142
143 hook = lambda file,pkg,x,y,z: \
144 add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True)
145 plugin_dir = d.expand('${libdir}/connman/plugins-vpn/')
146 plugin_name = d.expand('${PN}-plugin-vpn-%s')
147 do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
148 '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True )
149}
150
151PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
152
153FILES:${PN}-tools = "${bindir}/wispr"
154RDEPENDS:${PN}-tools = "${PN}"
155
156FILES:${PN}-tests = "${bindir}/*-test"
157
158FILES:${PN}-client = "${bindir}/connmanctl"
159RDEPENDS:${PN}-client = "${PN}"
160
161FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
162 ${libdir}/connman/plugins \
163 ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \
164 ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
165 ${datadir}/dbus-1/system-services/* \
166 ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf"
167
168FILES:${PN}-dev += "${libdir}/connman/*/*.la"
169
170PACKAGES =+ "${PN}-vpn ${PN}-wait-online"
171
172SUMMARY:${PN}-vpn = "A daemon for managing VPN connections within embedded devices"
173DESCRIPTION:${PN}-vpn = "The ConnMan VPN provides a daemon for \
174managing VPN connections within embedded devices running the Linux \
175operating system. The connman-vpnd handles all the VPN connections \
176and starts/stops VPN client processes when necessary. The connman-vpnd \
177provides a DBus API for managing VPN connections. All the different \
178VPN technogies are implemented using plug-ins."
179FILES:${PN}-vpn += "${sbindir}/connman-vpnd \
180 ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \
181 ${datadir}/dbus-1/system-services/net.connman.vpn.service \
182 ${systemd_system_unitdir}/connman-vpn.service"
183
184SUMMARY:${PN}-wait-online = "A program that will return once ConnMan has connected to a network"
185DESCRIPTION:${PN}-wait-online = "A service that can be enabled so that \
186the system waits until a network connection is established."
187FILES:${PN}-wait-online += "${sbindir}/connmand-wait-online \
188 ${systemd_system_unitdir}/connman-wait-online.service"
189
190SUMMARY:${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN"
191DESCRIPTION:${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \
192to create a VPN connection to OpenVPN server."
193FILES:${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \
194 ${libdir}/connman/plugins-vpn/openvpn.so"
195RDEPENDS:${PN}-plugin-vpn-openvpn += "${PN}-vpn"
196RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}"
197
198SUMMARY:${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN"
199DESCRIPTION:${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \
200to create a VPN connection to Cisco3000 VPN Concentrator."
201FILES:${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \
202 ${libdir}/connman/plugins-vpn/vpnc.so \
203 ${libdir}/connman/scripts/vpn-script"
204RDEPENDS:${PN}-plugin-vpn-vpnc += "${PN}-vpn"
205RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}"
206
207SUMMARY:${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN"
208DESCRIPTION:${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \
209to create a VPN connection to L2TP server."
210FILES:${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \
211 ${libdir}/connman/plugins-vpn/l2tp.so"
212RDEPENDS:${PN}-plugin-vpn-l2tp += "${PN}-vpn"
213RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}"
214
215SUMMARY:${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN"
216DESCRIPTION:${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \
217to create a VPN connection to PPTP server."
218FILES:${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \
219 ${libdir}/connman/plugins-vpn/pptp.so"
220RDEPENDS:${PN}-plugin-vpn-pptp += "${PN}-vpn"
221RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}"
diff --git a/meta/recipes-connectivity/connman/connman_1.44.bb b/meta/recipes-connectivity/connman/connman_1.44.bb
index 396d8bc5ce..1cd97d342f 100644
--- a/meta/recipes-connectivity/connman/connman_1.44.bb
+++ b/meta/recipes-connectivity/connman/connman_1.44.bb
@@ -1,4 +1,23 @@
1require connman.inc 1SUMMARY = "A daemon for managing internet connections within embedded devices"
2DESCRIPTION = "The ConnMan project provides a daemon for managing \
3internet connections within embedded devices running the Linux \
4operating system. The Connection Manager is designed to be slim and \
5to use as few resources as possible, so it can be easily integrated. \
6It is a fully modular system that can be extended, through plug-ins, \
7to support all kinds of wired or wireless technologies. Also, \
8configuration methods, like DHCP and domain name resolving, are \
9implemented using plug-ins."
10HOMEPAGE = "http://connman.net/"
11BUGTRACKER = "https://01.org/jira/browse/CM"
12LICENSE = "GPL-2.0-only"
13LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
14 file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36"
15
16inherit autotools pkgconfig systemd update-rc.d update-alternatives
17
18CVE_PRODUCT = "connman connection_manager"
19
20DEPENDS = "dbus glib-2.0 ppp"
2 21
3SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ 22SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
4 file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \ 23 file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
@@ -8,8 +27,208 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
8 file://0002-resolve-musl-does-not-implement-res_ninit.patch \ 27 file://0002-resolve-musl-does-not-implement-res_ninit.patch \
9 " 28 "
10 29
11
12SRC_URI[sha256sum] = "2be2b00321632b775f9eff713acd04ef21e31fbf388f6ebf45512ff4289574ff" 30SRC_URI[sha256sum] = "2be2b00321632b775f9eff713acd04ef21e31fbf388f6ebf45512ff4289574ff"
13 31
14RRECOMMENDS:${PN} = "connman-conf" 32RRECOMMENDS:${PN} = "connman-conf"
15RCONFLICTS:${PN} = "networkmanager" 33RCONFLICTS:${PN} = "networkmanager"
34
35EXTRA_OECONF += "\
36 ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \
37 ac_cv_path_PPPD=${sbindir}/pppd \
38 --enable-debug \
39 --enable-loopback \
40 --enable-ethernet \
41 --enable-tools \
42 --disable-polkit \
43 --runstatedir=/run \
44"
45# For smooth operation it would be best to start only one wireless daemon at a time.
46# If wpa-supplicant is running, connman will use it preferentially.
47# Select either wpa-supplicant or iwd
48WIRELESS_DAEMON ??= "wpa-supplicant"
49
50PACKAGECONFIG ??= "wispr iptables client\
51 ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \
52 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
53 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \
54"
55
56# If you want ConnMan to support VPN, add following statement into
57# local.conf or distro config
58# PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp"
59
60PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''"
61PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi"
62PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5"
63PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono"
64PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant"
65PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd"
66PACKAGECONFIG[tist] = "--enable-tist,--disable-tist,"
67PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn"
68PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc"
69PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd"
70PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
71# WISPr support for logging into hotspots, requires TLS
72PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
73PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-masq-ipv4 kernel-module-nft-nat"
74PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables"
75PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard"
76PACKAGECONFIG[client] = "--enable-client,--disable-client,readline"
77PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl"
78
79INITSCRIPT_NAME = "connman"
80INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
81
82python __anonymous () {
83 systemd_packages = "${PN} ${PN}-wait-online"
84 pkgconfig = d.getVar('PACKAGECONFIG')
85 if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
86 systemd_packages += " ${PN}-vpn"
87 d.setVar('SYSTEMD_PACKAGES', systemd_packages)
88}
89
90SYSTEMD_SERVICE:${PN} = "connman.service"
91SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service"
92SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service"
93
94ALTERNATIVE_PRIORITY = "100"
95ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}"
96ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}"
97ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
98
99do_install:append() {
100 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
101 install -d ${D}${sysconfdir}/init.d
102 install -m 0755 ${UNPACKDIR}/connman ${D}${sysconfdir}/init.d/connman
103 sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman
104 fi
105
106 install -d ${D}${bindir}
107 install -m 0755 ${B}/tools/*-test ${D}${bindir}
108 if [ -e ${B}/tools/wispr ]; then
109 install -m 0755 ${B}/tools/wispr ${D}${bindir}
110 fi
111
112 # We don't need to package an empty directory
113 rmdir --ignore-fail-on-non-empty ${D}${libdir}/connman/scripts
114
115 # Automake 1.12 won't install empty directories, but we need the
116 # plugins directory to be present for ownership
117 mkdir -p ${D}${libdir}/connman/plugins
118
119 # For read-only filesystem, do not create links during bootup
120 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
121 ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman
122 fi
123}
124
125# These used to be plugins, but now they are core
126RPROVIDES:${PN} = "\
127 connman-plugin-loopback \
128 connman-plugin-ethernet \
129 ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \
130 ${@bb.utils.contains('PACKAGECONFIG', 'wifi','connman-plugin-wifi', '', d)} \
131 ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \
132 "
133
134PACKAGES_DYNAMIC += "^${PN}-plugin-.*"
135
136def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip):
137 plugintype = pkg.split( '-' )[-1]
138 if plugintype in depmap:
139 rdepends = map(lambda x: multilib_prefix + x, \
140 depmap[plugintype].split())
141 d.setVar("RDEPENDS:%s" % pkg, " ".join(rdepends))
142 if add_insane_skip:
143 d.appendVar("INSANE_SKIP:%s" % pkg, "dev-so")
144
145python populate_packages:prepend() {
146 depmap = dict(pppd="ppp")
147 multilib_prefix = (d.getVar("MLPREFIX") or "")
148
149 hook = lambda file,pkg,x,y,z: \
150 add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False)
151 plugin_dir = d.expand('${libdir}/connman/plugins/')
152 plugin_name = d.expand('${PN}-plugin-%s')
153 do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
154 '${PN} plugin for %s', extra_depends='', hook=hook, prepend=True )
155
156 hook = lambda file,pkg,x,y,z: \
157 add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True)
158 plugin_dir = d.expand('${libdir}/connman/plugins-vpn/')
159 plugin_name = d.expand('${PN}-plugin-vpn-%s')
160 do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
161 '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True )
162}
163
164PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
165
166FILES:${PN}-tools = "${bindir}/wispr"
167RDEPENDS:${PN}-tools = "${PN}"
168
169FILES:${PN}-tests = "${bindir}/*-test"
170
171FILES:${PN}-client = "${bindir}/connmanctl"
172RDEPENDS:${PN}-client = "${PN}"
173
174FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
175 ${libdir}/connman/plugins \
176 ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \
177 ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
178 ${datadir}/dbus-1/system-services/* \
179 ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf"
180
181FILES:${PN}-dev += "${libdir}/connman/*/*.la"
182
183PACKAGES =+ "${PN}-vpn ${PN}-wait-online"
184
185SUMMARY:${PN}-vpn = "A daemon for managing VPN connections within embedded devices"
186DESCRIPTION:${PN}-vpn = "The ConnMan VPN provides a daemon for \
187managing VPN connections within embedded devices running the Linux \
188operating system. The connman-vpnd handles all the VPN connections \
189and starts/stops VPN client processes when necessary. The connman-vpnd \
190provides a DBus API for managing VPN connections. All the different \
191VPN technogies are implemented using plug-ins."
192FILES:${PN}-vpn += "${sbindir}/connman-vpnd \
193 ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \
194 ${datadir}/dbus-1/system-services/net.connman.vpn.service \
195 ${systemd_system_unitdir}/connman-vpn.service"
196
197SUMMARY:${PN}-wait-online = "A program that will return once ConnMan has connected to a network"
198DESCRIPTION:${PN}-wait-online = "A service that can be enabled so that \
199the system waits until a network connection is established."
200FILES:${PN}-wait-online += "${sbindir}/connmand-wait-online \
201 ${systemd_system_unitdir}/connman-wait-online.service"
202
203SUMMARY:${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN"
204DESCRIPTION:${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \
205to create a VPN connection to OpenVPN server."
206FILES:${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \
207 ${libdir}/connman/plugins-vpn/openvpn.so"
208RDEPENDS:${PN}-plugin-vpn-openvpn += "${PN}-vpn"
209RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}"
210
211SUMMARY:${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN"
212DESCRIPTION:${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \
213to create a VPN connection to Cisco3000 VPN Concentrator."
214FILES:${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \
215 ${libdir}/connman/plugins-vpn/vpnc.so \
216 ${libdir}/connman/scripts/vpn-script"
217RDEPENDS:${PN}-plugin-vpn-vpnc += "${PN}-vpn"
218RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}"
219
220SUMMARY:${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN"
221DESCRIPTION:${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \
222to create a VPN connection to L2TP server."
223FILES:${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \
224 ${libdir}/connman/plugins-vpn/l2tp.so"
225RDEPENDS:${PN}-plugin-vpn-l2tp += "${PN}-vpn"
226RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}"
227
228SUMMARY:${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN"
229DESCRIPTION:${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \
230to create a VPN connection to PPTP server."
231FILES:${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \
232 ${libdir}/connman/plugins-vpn/pptp.so"
233RDEPENDS:${PN}-plugin-vpn-pptp += "${PN}-vpn"
234RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}"