diff options
author | John Klug <john.klug@multitech.com> | 2020-07-06 18:33:37 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2020-07-22 17:08:41 -0500 |
commit | 36a8e6c1cb1a5fbfe460e6a8125e220b93a19d49 (patch) | |
tree | 6e6b5714e9cf33b1c1249903fa840c4e8eb1a646 /recipes-connectivity/bluez | |
parent | b04248e71a5534343e3bf79bd494e9ec1cfa6bf9 (diff) | |
download | meta-mlinux-36a8e6c1cb1a5fbfe460e6a8125e220b93a19d49.tar.gz meta-mlinux-36a8e6c1cb1a5fbfe460e6a8125e220b93a19d49.tar.bz2 meta-mlinux-36a8e6c1cb1a5fbfe460e6a8125e220b93a19d49.zip |
Create a configuration package to install WiFi and BT access point for testing
Diffstat (limited to 'recipes-connectivity/bluez')
-rw-r--r-- | recipes-connectivity/bluez/bluez5.inc | 23 | ||||
-rwxr-xr-x | recipes-connectivity/bluez/bluez5/bt-pan/init | 1 |
2 files changed, 23 insertions, 1 deletions
diff --git a/recipes-connectivity/bluez/bluez5.inc b/recipes-connectivity/bluez/bluez5.inc index 35ebd0c..14e2f56 100644 --- a/recipes-connectivity/bluez/bluez5.inc +++ b/recipes-connectivity/bluez/bluez5.inc @@ -1,5 +1,9 @@ SUMMARY = "Linux Bluetooth Stack Userland V5" +# Might want to skip to m6 next time, because pand +# is now at m5. PR = "m4" +# Tried m4a, but opkg says that is a downgrade. +PR_${PN}-pand = "m5" DESCRIPTION = "Linux Bluetooth stack V5 userland components. These include a system configurations, daemons, tools and system libraries." HOMEPAGE = "http://www.bluez.org" SECTION = "libs" @@ -34,6 +38,7 @@ SRC_URI = "\ file://rfcomm/rfcomm.py \ file://rfcomm/init \ file://rfcomm/default \ + file://BT-Name \ " S = "${WORKDIR}/bluez-${PV}" @@ -99,10 +104,13 @@ do_install_append() { install -m 0644 ${WORKDIR}/bt-pan/default ${D}${sysconfdir}/default/bt-pan install -m 0644 ${WORKDIR}/rfcomm/default ${D}${sysconfdir}/default/rfcomm install -m 0644 ${WORKDIR}/main.conf ${D}${sysconfdir}/bluetooth/ + + install -d ${D}/usr/share/bluez5 + install -m 0444 ${WORKDIR}/BT-Name ${D}/usr/share/bluez5/BT-Name.patch } ALLOW_EMPTY_libasound-module-bluez = "1" -PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex ${PN}-noinst-tools ${PN}-pand ${PN}-rfcomm" +PACKAGES =+ "${PN}-bt-name libasound-module-bluez ${PN}-testtools ${PN}-obex ${PN}-noinst-tools ${PN}-pand ${PN}-rfcomm" FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa" FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${systemd_unitdir}/ ${datadir}/dbus-1" @@ -120,6 +128,8 @@ FILES_${PN}-obex = "${libexecdir}/bluetooth/obexd \ FILES_${PN}-pand = "${libexecdir}/bluetooth/bt-pan ${sysconfdir}/default/bt-pan ${sysconfdir}/init.d/bt-pan" FILES_${PN}-rfcomm = "${libexecdir}/bluetooth/bt-pan ${sysconfdir}/default/bt-pan ${sysconfdir}/init.d/bt-pan" FILES_${PN}-rfcomm = "${libexecdir}/bluetooth/rfcomm ${sysconfdir}/default/rfcomm ${sysconfdir}/init.d/rfcomm" +FILES_${PN}-bt-name = "/usr/share/bluez5/*" + CONFFILES_${PN}-pand = "${sysconfdir}/default/bt-pan" CONFFILES_${PN}-rfcomm = "${sysconfdir}/default/rfcomm" SYSTEMD_SERVICE_${PN}-obex = "obex.service" @@ -137,6 +147,7 @@ def get_noinst_tools_paths (d, bb, tools): FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}" RDEPENDS_${PN}-testtools += "python3 python3-dbus python3-pygobject" +RDEPENDS_${PN}-bt-name += "bluez5" SYSTEMD_SERVICE_${PN} = "bluetooth.service" INITSCRIPT_PACKAGES = "${PN} ${PN}-pand ${PN}-rfcomm" @@ -157,3 +168,13 @@ do_install_ptest() { cp -r ${B}/unit/ ${D}${PTEST_PATH} rm -f ${D}${PTEST_PATH}/unit/*.o } + +pkg_postinst_${PN}-bt-name() { + cd /$D + patch -Np1 < $D/usr/share/bluez5/BT-Name.patch +} + +pkg_prerm_${PN}-bt-name() { + cd /$D + patch -Rp1 < $D/usr/share/bluez5/BT-Name.patch +} diff --git a/recipes-connectivity/bluez/bluez5/bt-pan/init b/recipes-connectivity/bluez/bluez5/bt-pan/init index 3f7062e..2d3d70a 100755 --- a/recipes-connectivity/bluez/bluez5/bt-pan/init +++ b/recipes-connectivity/bluez/bluez5/bt-pan/init @@ -17,6 +17,7 @@ fi case $1 in start) + ifup $BRIDGE echo "Starting ${DNAME}" /usr/sbin/start-stop-daemon -S -p ${PIDFILE} -x ${PYTHON} -b -- ${SERVER} ${PANOPTS} server $BRIDGE ;; |