summaryrefslogtreecommitdiff
path: root/recipes-connectivity/bluez/bluez5_%.bbappend
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-07-27 17:39:50 -0500
committerJohn Klug <john.klug@multitech.com>2020-07-27 17:39:50 -0500
commit1518daaab14e7eaa23d01248384de86ed04c05b1 (patch)
tree573f77e20a5cff831738872ac1c3524c12b08cf5 /recipes-connectivity/bluez/bluez5_%.bbappend
parentaa05dbc9fd7a22d15079b774fc79b43f38299942 (diff)
downloadmeta-mlinux-1518daaab14e7eaa23d01248384de86ed04c05b1.tar.gz
meta-mlinux-1518daaab14e7eaa23d01248384de86ed04c05b1.tar.bz2
meta-mlinux-1518daaab14e7eaa23d01248384de86ed04c05b1.zip
Move bluez5 to 5.50
Diffstat (limited to 'recipes-connectivity/bluez/bluez5_%.bbappend')
-rw-r--r--recipes-connectivity/bluez/bluez5_%.bbappend83
1 files changed, 82 insertions, 1 deletions
diff --git a/recipes-connectivity/bluez/bluez5_%.bbappend b/recipes-connectivity/bluez/bluez5_%.bbappend
index ab89900..70e0fcb 100644
--- a/recipes-connectivity/bluez/bluez5_%.bbappend
+++ b/recipes-connectivity/bluez/bluez5_%.bbappend
@@ -1,4 +1,85 @@
+# Might want to skip to m6 next time, because pand
+# is now at m5.
+PR = "m1"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
EXTRA_OECONF += "--enable-deprecated --enable-experimental"
-RDEPENDS_${PN}-rfcomm += "python-pybluez"
+RDEPENDS_${PN}-pand += "bash python-dbus python-logging python-syslog python-subprocess python-argparse"
+RDEPENDS_${PN}-rfcomm += "bash python-pygobject python-syslog python-logging python-dbus python-pybluez"
+RDEPENDS_bluez5 += "bash"
+
+SRC_URI += "\
+ file://init \
+ file://main.conf \
+ file://bt-pan/init \
+ file://bt-pan/default \
+ file://bt-pan/bt-pan \
+ file://rfcomm/rfcomm.py \
+ file://rfcomm/init \
+ file://rfcomm/default \
+ file://BT-Name \
+"
+PACKAGES =+ "${PN}-bt-name libasound-module-bluez ${PN}-pand ${PN}-rfcomm"
+
+DBTEXEC = "${D}${libexecdir}/bluetooth/"
+
+
+do_install_append() {
+ echo "sysconfdir is ${D}${sysconfdir}"
+ install -m 0755 ${WORKDIR}/bt-pan/init ${D}${INIT_D_DIR}/bt-pan
+ install -m 0755 ${WORKDIR}/rfcomm/init ${D}${INIT_D_DIR}/rfcomm
+ install -d ${DBTEXEC}
+ install -m 0755 ${WORKDIR}/bt-pan/bt-pan ${DBTEXEC}
+ install -m 0755 ${WORKDIR}/rfcomm/rfcomm.py ${DBTEXEC}/rfcomm
+ echo ls ${WORKDIR}
+ ls ${WORKDIR}
+ echo ls ${WORKDIR}/bt-pan
+ ls ${WORKDIR}/bt-pan
+ install -d ${D}${sysconfdir}/default
+ 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
+ echo "Before init.d/bluetooth test"
+ if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then
+ sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth
+ fi
+ echo "JAK: sysconfdir is ${D}${sysconfdir}"
+ set -x
+ install -d ${D}${sysconfdir}/default
+
+ echo ls -d ${WORKDIR}/bt-pan/default
+ ls -d ${WORKDIR}/bt-pan/default
+
+ 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
+}
+
+CONFFILES_${PN} += "${sysconfdir}/default/bluetooth ${sysconfdir}/bluetooth/main.conf ${sysconfdir}/bluetooth/input.conf ${sysconfdir}/bluetooth/network.conf"
+
+INITSCRIPT_PACKAGES = "${PN} ${PN}-pand ${PN}-rfcomm"
+
+INITSCRIPT_NAME_${PN}-pand = "bt-pan"
+INITSCRIPT_NAME_${PN}-rfcomm = "rfcomm"
+INITSCRIPT_PARAMS_${PN} = "defaults 20 20"
+INITSCRIPT_PARAMS_${PN}-pand = "defaults 22 22"
+INITSCRIPT_PARAMS_${PN}-rfcomm = "defaults 22 22"
+
+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
+}