diff --git a/packages/network/bluez/build b/packages/network/bluez/build index 1c9f9c300c..67668175df 100755 --- a/packages/network/bluez/build +++ b/packages/network/bluez/build @@ -22,17 +22,22 @@ . config/options +if [ "$ALSA_SUPPORT" = "yes" ]; then + BLUEZ_ALSA="--enable-audio --enable-alsa" +else + BLUEZ_ALSA="--disable-audio --disable-alsa" +fi + if [ "$DEBUG" = "yes" ]; then DEBUG_CONFIG="--enable-debug" else DEBUG_CONFIG="--disable-debug" fi - if [ "$DEVTOOLS" = "yes" ]; then - DEVTOOLS_CONFIG="--enable-monitor --enable-test --enable-tools" + DEVTOOLS_CONFIG="--enable-bccmd --enable-tools" else - DEVTOOLS_CONFIG="--disable-monitor --disable-test --disable-tools" -fi + DEVTOOLS_CONFIG="--disable-bccmd --disable-tools" +fi cd $PKG_BUILD ./configure --host=$TARGET_NAME \ @@ -45,18 +50,38 @@ cd $PKG_BUILD --disable-silent-rules \ --enable-shared \ --disable-static \ - --enable-library \ + --enable-optimization \ + --enable-fortify \ + --disable-pie \ + --enable-network \ + --disable-sap \ + --disable-proximity \ + --disable-serial \ + --enable-input \ + --enable-service \ + --enable-health \ + --disable-pnat \ + --disable-gstreamer \ + $BLUEZ_ALSA \ --enable-usb \ - --enable-udev \ - --disable-cups \ - --disable-obex \ - --enable-client \ - --disable-systemd \ --enable-datafiles \ - --disable-experimental \ + --enable-pcmcia \ + --enable-hid2hci \ + --enable-dfutool \ + --disable-hidd \ + --disable-pand \ + --disable-dund \ + --disable-cups \ + --enable-wiimote \ + --disable-maemo6 \ + --disable-dbusoob \ + --enable-thermometer \ + --disable-hal \ + --disable-capng \ --with-gnu-ld \ $DEBUG_CONFIG \ $DEVTOOLS_CONFIG \ + --disable-test make diff --git a/packages/network/bluez/config/main.conf b/packages/network/bluez/config/main.conf new file mode 100644 index 0000000000..0ff6b0b921 --- /dev/null +++ b/packages/network/bluez/config/main.conf @@ -0,0 +1,66 @@ +[General] + +# List of plugins that should not be loaded on bluetoothd startup +DisablePlugins = input + +# Default adaper name +# %h - substituted for hostname +# %d - substituted for adapter id +Name = %h-%d + +# Default device class. Only the major and minor device class bits are +# considered. +Class = 0x000100 + +# How long to stay in discoverable mode before going back to non-discoverable +# The value is in seconds. Default is 180, i.e. 3 minutes. +# 0 = disable timer, i.e. stay discoverable forever +DiscoverableTimeout = 0 + +# How long to stay in pairable mode before going back to non-discoverable +# The value is in seconds. Default is 0. +# 0 = disable timer, i.e. stay pairable forever +PairableTimeout = 0 + +# Use some other page timeout than the controller default one +# which is 16384 (10 seconds). +PageTimeout = 8192 + +# Discover scheduler interval used in Adapter.DiscoverDevices +# The value is in seconds. Defaults is 30. +DiscoverSchedulerInterval = 30 + +# What value should be assumed for the adapter Powered property when +# SetProperty(Powered, ...) hasn't been called yet. Defaults to true +InitiallyPowered = true + +# Remember the previously stored Powered state when initializing adapters +RememberPowered = true + +# Use vendor, product and version information for DID profile support. +# The values are separated by ":" and VID, PID and version. +#DeviceID = 1234:5678:abcd + +# Do reverse service discovery for previously unknown devices that connect to +# us. This option is really only needed for qualification since the BITE tester +# doesn't like us doing reverse SDP for some test cases (though there could in +# theory be other useful purposes for this too). Defaults to true. +ReverseServiceDiscovery = true + +# Enable name resolving after inquiry. Set it to 'false' if you don't need +# remote devices name and want shorter discovery cycle. Defaults to 'true'. +NameResolving = true + +# Enable runtime persistency of debug link keys. Default is false which +# makes debug link keys valid only for the duration of the connection +# that they were created for. +DebugKeys = false + +# Enable Low Energy support if the dongle supports. Default is false. +# Enable/Disable interleave discovery and attribute server over LE. +EnableLE = false + +# Enable the GATT Attribute Server. Default is false, because it is only +# useful for testing. Attribute server is not enabled over LE if EnableLE +# is false. +AttributeServer = false diff --git a/packages/network/bluez/install b/packages/network/bluez/install index 61218f9d25..bf605ad081 100755 --- a/packages/network/bluez/install +++ b/packages/network/bluez/install @@ -22,39 +22,59 @@ . config/options +PKG_DIR=`find $PACKAGES -type d -name $1` + +mkdir -p $INSTALL/etc/bluetooth +# cp $PKG_BUILD/src/main.conf $INSTALL/etc/bluetooth + cp $PKG_DIR/config/main.conf $INSTALL/etc/bluetooth + cp $PKG_BUILD/tools/rfcomm.conf $INSTALL/etc/bluetooth + cp $PKG_BUILD/input/input.conf $INSTALL/etc/bluetooth + + if [ "$ALSA_SUPPORT" = yes ]; then + cp $PKG_BUILD/audio/audio.conf $INSTALL/etc/bluetooth + fi + mkdir -p $INSTALL/etc/dbus-1/system.d cp $PKG_BUILD/src/bluetooth.conf $INSTALL/etc/dbus-1/system.d mkdir -p $INSTALL/lib/udev +# not needed: cp $PKG_BUILD/scripts/bluetooth_serial $INSTALL/lib/udev +# not needed: chmod +x $INSTALL/lib/udev/bluetooth_serial cp $PKG_BUILD/tools/hid2hci $INSTALL/lib/udev mkdir -p $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/tools/97-hid2hci.rules $INSTALL/lib/udev/rules.d + cp $PKG_BUILD/scripts/97-bluetooth.rules $INSTALL/lib/udev/rules.d +# todo: cp $PKG_BUILD/scripts/97-bluetooth-hid2hci.rules $INSTALL/lib/udev/rules.d +# not needed: cp $PKG_BUILD/scripts/97-bluetooth-serial.rules $INSTALL/lib/udev/rules.d mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/lib/.libs/libbluetooth.so* $INSTALL/usr/lib -mkdir -p $INSTALL/usr/lib/bluetooth - cp $PKG_BUILD/src/bluetoothd $INSTALL/usr/lib/bluetooth - cp $PKG_BUILD/obexd/src/obexd $INSTALL/usr/lib/bluetooth +if [ "$ALSA_SUPPORT" = yes ]; then + mkdir -p $INSTALL/usr/lib/alsa + cp $PKG_BUILD/audio/.libs/*.so $INSTALL/usr/lib/alsa +fi + +mkdir -p $INSTALL/usr/lib/bluetooth/plugins + +mkdir -p $INSTALL/usr/sbin + cp $PKG_BUILD/src/bluetoothd $INSTALL/usr/sbin + +mkdir -p $INSTALL/usr/share/alsa + cp $PKG_BUILD/audio/bluetooth.conf $INSTALL/usr/share/alsa if [ "$DEVTOOLS" = "yes" ]; then -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/tools/bccmd $INSTALL/usr/bin - cp $PKG_BUILD/client/bluetoothctl $INSTALL/usr/bin - cp $PKG_BUILD/monitor/btmon $INSTALL/usr/bin - cp $PKG_BUILD/tools/ciptool $INSTALL/usr/bin - cp $PKG_BUILD/tools/hciattach $INSTALL/usr/bin - cp $PKG_BUILD/tools/hciconfig $INSTALL/usr/bin - cp $PKG_BUILD/tools/hcidump $INSTALL/usr/bin - cp $PKG_BUILD/tools/hcitool $INSTALL/usr/bin - cp $PKG_BUILD/tools/l2ping $INSTALL/usr/bin - cp $PKG_BUILD/tools/l2test $INSTALL/usr/bin - cp $PKG_BUILD/tools/rctest $INSTALL/usr/bin - cp $PKG_BUILD/tools/rfcomm $INSTALL/usr/bin - cp $PKG_BUILD/tools/sdptool $INSTALL/usr/bin + mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/tools/ciptool $INSTALL/usr/bin + cp $PKG_BUILD/tools/dfutool $INSTALL/usr/bin + cp $PKG_BUILD/tools/hcitool $INSTALL/usr/bin + cp $PKG_BUILD/tools/l2ping $INSTALL/usr/bin + cp $PKG_BUILD/tools/rfcomm $INSTALL/usr/bin + cp $PKG_BUILD/tools/sdptool $INSTALL/usr/bin - mkdir -p $INSTALL/usr/lib/bluez/test - cp -P $PKG_BUILD/test/* $INSTALL/usr/lib/bluez/test - chmod +x $INSTALL/usr/lib/bluez/test/* +mkdir -p $INSTALL/usr/sbin + cp $PKG_BUILD/tools/bccmd $INSTALL/usr/sbin # TODO + cp $PKG_BUILD/tools/hciattach $INSTALL/usr/sbin + cp $PKG_BUILD/tools/hciconfig $INSTALL/usr/sbin fi + diff --git a/packages/network/bluez/meta b/packages/network/bluez/meta index 8558547642..26f83b8fc0 100644 --- a/packages/network/bluez/meta +++ b/packages/network/bluez/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="bluez" -PKG_VERSION="5.1" +PKG_VERSION="4.99" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/network/bluez/patches/bluez-4.99-automake_1.13.patch b/packages/network/bluez/patches/bluez-4.99-automake_1.13.patch new file mode 100644 index 0000000000..68b48872d4 --- /dev/null +++ b/packages/network/bluez/patches/bluez-4.99-automake_1.13.patch @@ -0,0 +1,12 @@ +diff -Naur bluez-4.101-old/configure.ac bluez-4.101-new/configure.ac +--- bluez-4.101-old/configure.ac 2012-06-22 09:36:49.000000000 -0700 ++++ bluez-4.101-new/configure.ac 2012-12-29 08:49:05.000000000 -0800 +@@ -2,7 +2,7 @@ + AC_INIT(bluez, 4.101) + + AM_INIT_AUTOMAKE([foreign subdir-objects color-tests]) +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS(config.h) + + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + diff --git a/packages/network/bluez/patches/bluez-4.99-systemd.patch b/packages/network/bluez/patches/bluez-4.99-systemd.patch new file mode 100644 index 0000000000..56cfc6db29 --- /dev/null +++ b/packages/network/bluez/patches/bluez-4.99-systemd.patch @@ -0,0 +1,15 @@ +X-Git-Url: http://git.kernel.org/?p=bluetooth%2Fbluez.git;a=blobdiff_plain;f=tools%2Fhid2hci.c;h=e3a5b2ef785a782bd3da4ae9c44704a32dc2f665;hp=45a3a3db8b29411ee193e480f5ce8a82a40103d1;hb=35beaaa5b39d50eabd54563804182bb01a5d7ff4;hpb=cc47dc79aac98f7b25bd2afccf1c10560e779d16 + +diff --git a/tools/hid2hci.c b/tools/hid2hci.c +index 45a3a3d..e3a5b2e 100644 +--- a/tools/hid2hci.c ++++ b/tools/hid2hci.c +@@ -291,7 +291,7 @@ int main(int argc, char *argv[]) + if (udev == NULL) + goto exit; + +- snprintf(syspath, sizeof(syspath), "%s/%s", udev_get_sys_path(udev), devpath); ++ snprintf(syspath, sizeof(syspath), "/sys/%s", devpath); + udev_dev = udev_device_new_from_syspath(udev, syspath); + if (udev_dev == NULL) { + fprintf(stderr, "error: could not find '%s'\n", devpath); diff --git a/packages/network/bluez/udev.d/09-bluetooth.rules b/packages/network/bluez/udev.d/09-bluetooth.rules new file mode 100644 index 0000000000..b5be47b242 --- /dev/null +++ b/packages/network/bluez/udev.d/09-bluetooth.rules @@ -0,0 +1,6 @@ +ACTION!="add|change", GOTO="end" + +KERNEL=="hci[0-9]*", SUBSYSTEM=="bluetooth", RUN+="/usr/sbin/hciconfig %k up" +KERNEL=="hci[0-9]*", SUBSYSTEM=="bluetooth", RUN+="/usr/sbin/hciconfig %k lm master" + +LABEL="end"