diff options
| -rw-r--r-- | recipes-connectivity/bluez/bluez5.inc | 180 | ||||
| -rwxr-xr-x | recipes-connectivity/bluez/bluez5/bt-pan/init | 1 | ||||
| -rw-r--r-- | recipes-connectivity/bluez/bluez5_%.bbappend | 83 | ||||
| -rw-r--r-- | recipes-connectivity/bluez/bluez5_5.47.bb | 55 | 
4 files changed, 82 insertions, 237 deletions
| diff --git a/recipes-connectivity/bluez/bluez5.inc b/recipes-connectivity/bluez/bluez5.inc deleted file mode 100644 index 14e2f56..0000000 --- a/recipes-connectivity/bluez/bluez5.inc +++ /dev/null @@ -1,180 +0,0 @@ -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" -LICENSE = "GPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ -                    file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ -                    file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e" -DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck readline" -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" -PROVIDES += "bluez-hcidump" -RPROVIDES_${PN} += "bluez-hcidump" - -RCONFLICTS_${PN} = "bluez4" - -PACKAGECONFIG ??= "obex-profiles" -PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical" -PACKAGECONFIG[experimental] = "--enable-experimental,--enable-experimental" - -SRC_URI = "\ -    ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ -    file://out-of-tree.patch \ -    file://init \ -    file://run-ptest \ -    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \ -    file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ -    file://default \ -    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 \ -" -S = "${WORKDIR}/bluez-${PV}" - -inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest - -EXTRA_OECONF = "\ -  --enable-tools \ -  --disable-cups \ -  --enable-test \ -  --enable-datafiles \ -  ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd', '--disable-systemd', d)} \ -  --enable-library \ -  --enable-deprecated \ -  --enable-experimental \ -" - -# bluez5 builds a large number of useful utilities but does not -# install them.  Specify which ones we want put into ${PN}-noinst-tools. -NOINST_TOOLS_READLINE ??= "" -NOINST_TOOLS_EXPERIMENTAL ??= "" -NOINST_TOOLS = " \ -    ${NOINST_TOOLS_READLINE} \ -    ${@bb.utils.contains('PACKAGECONFIG', 'experimental', '${NOINST_TOOLS_EXPERIMENTAL}', '', d)} \ -" - -DBTEXEC = "${D}${libexecdir}/bluetooth/" - -do_install_append() { -	install -d ${D}${INIT_D_DIR} -	install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth -	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 - -	install -d ${D}${sysconfdir}/bluetooth/ -	if [ -f ${S}/profiles/audio/audio.conf ]; then -	    install -m 0644 ${S}/profiles/audio/audio.conf ${D}/${sysconfdir}/bluetooth/ -	fi -	if [ -f ${S}/profiles/network/network.conf ]; then -	    install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/ -	fi -	if [ -f ${S}/profiles/input/input.conf ]; then -	    install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/ -	fi - -        if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then -            sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth -        fi - -	# Install desired tools that upstream leaves in build area -        for f in ${NOINST_TOOLS} ; do -	    install -m 755 ${B}/$f ${D}/${bindir} -	done - -        # Patch python tools to use Python 3; they should be source compatible, but -        # still refer to Python 2 in the shebang -        sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/bluez/test/* -         -        install -d ${D}${sysconfdir}/default -        install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/bluetooth -        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 =+ "${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" -CONFFILES_${PN} += "${sysconfdir}/default/bluetooth ${sysconfdir}/bluetooth/main.conf ${sysconfdir}/bluetooth/input.conf ${sysconfdir}/bluetooth/network.conf" -FILES_${PN}-dev += "\ -  ${libdir}/bluetooth/plugins/*.la \ -  ${libdir}/alsa-lib/*.la \ -" - -FILES_${PN}-obex = "${libexecdir}/bluetooth/obexd \ -                    ${exec_prefix}/lib/systemd/user/obex.service \ -                    ${datadir}/dbus-1/services/org.bluez.obex.service \ -                   " - -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" - -FILES_${PN}-testtools = "${libdir}/bluez/test/*" - -def get_noinst_tools_paths (d, bb, tools): -    s = list() -    bindir = d.getVar("bindir", True) -    for bdp in tools.split(): -        f = os.path.basename(bdp) -        s.append("%s/%s" % (bindir, f)) -    return "\n".join(s) - -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" -INITSCRIPT_NAME_${PN} = "bluetooth" -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" - -EXCLUDE_FROM_WORLD = "1" - -do_compile_ptest() { -        oe_runmake buildtests -} - -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 2d3d70a..3f7062e 100755 --- a/recipes-connectivity/bluez/bluez5/bt-pan/init +++ b/recipes-connectivity/bluez/bluez5/bt-pan/init @@ -17,7 +17,6 @@ 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      ;; 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 +} diff --git a/recipes-connectivity/bluez/bluez5_5.47.bb b/recipes-connectivity/bluez/bluez5_5.47.bb deleted file mode 100644 index fb17add..0000000 --- a/recipes-connectivity/bluez/bluez5_5.47.bb +++ /dev/null @@ -1,55 +0,0 @@ -require bluez5.inc - -REQUIRED_DISTRO_FEATURES = "bluez5" - -SRC_URI[md5sum] = "783e15f65e70cdb8f721c659e140dd56" -SRC_URI[sha256sum] = "cf75bf7cd5d564f21cc4a2bd01d5c39ce425397335fd47d9bbe43af0a58342c8" - -# noinst programs in Makefile.tools that are conditional on READLINE -# support -NOINST_TOOLS_READLINE ?= " \ -    attrib/gatttool \ -    tools/obex-client-tool \ -    tools/obex-server-tool \ -    tools/bluetooth-player \ -    tools/obexctl \ -    tools/btmgmt \ -" - -# noinst programs in Makefile.tools that are conditional on EXPERIMENTAL -# support -NOINST_TOOLS_EXPERIMENTAL ?= " \ -    emulator/btvirt \ -    emulator/b1ee \ -    emulator/hfp \ -    tools/3dsp \ -    tools/mgmt-tester \ -    tools/gap-tester \ -    tools/l2cap-tester \ -    tools/sco-tester \ -    tools/smp-tester \ -    tools/hci-tester \ -    tools/rfcomm-tester \ -    tools/bdaddr \ -    tools/avinfo \ -    tools/avtest \ -    tools/scotest \ -    tools/amptest \ -    tools/hwdb \ -    tools/hcieventmask \ -    tools/hcisecfilter \ -    tools/btinfo \ -    tools/btattach \ -    tools/btsnoop \ -    tools/btproxy \ -    tools/btiotest \ -    tools/mcaptest \ -    tools/cltest \ -    tools/oobtest \ -    tools/seq2bseq \ -    tools/ibeacon \ -    tools/btgatt-client \ -    tools/btgatt-server \ -    tools/gatt-service \ -    profiles/iap/iapd \ -" | 
