Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[vuplus_openembedded] / recipes / bluez / bluez-utils3.inc
1 DESCRIPTION = "Linux Bluetooth Stack Userland Utilities."
2 SECTION = "console"
3 PRIORITY = "optional"
4 DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} libusb-compat dbus glib-2.0"
5 PROVIDES = "bluez-utils-dbus"
6 RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus"
7 RREPLACES = "bluez-utils-dbus"
8 RCONFLICTS_${PN} = "bluez-utils-nodbus"
9 LICENSE = "GPL"
10
11 FILESPATH = "${FILE_DIRNAME}/bluez-utils-${PV}:${FILE_DIRNAME}/bluez-utils"
12
13 # ti patch should be sent it upstream!
14 SRC_URI = "http://bluez.sourceforge.net/download/bluez-utils-${PV}.tar.gz \
15            file://hcid.conf \
16            file://hciattach-ti-bts.patch;patch=1 \
17            file://sbc-thumb.patch;patch=1"
18
19
20 S = "${WORKDIR}/bluez-utils-${PV}"
21
22 inherit autotools update-rc.d
23
24 EXTRA_OECONF = " \
25                  --enable-bccmd \
26                  --enable-hid2hci \
27                  --enable-alsa \ 
28                  --enable-cups \
29                  --enable-glib \
30                  --disable-sdpd \
31                  --enable-network \
32                  --enable-serial \
33                  --enable-input \
34                  --enable-audio \
35                  --enable-echo \
36                  --enable-configfile \
37                  --enable-initscripts \
38                  --enable-test \
39                 " 
40
41 # The config options are explained below:
42
43 #  --enable-obex           enable OBEX support
44 #  --enable-alsa           enable ALSA support, not needed for nokia770, nokia800 and om-gtao1
45 #  --enable-cups           install CUPS backend support
46 #  --enable-bccmd          install BCCMD interface utility
47 #  --enable-avctrl         install Audio/Video control utility
48 #  --enable-hid2hci        install HID mode switching utility
49 #  --enable-dfutool        install DFU firmware upgrade utility
50
51 #  --enable-glib           For systems that use and install GLib anyway
52 #  --disable-sdpd          The sdpd is obsolete and should no longer be used. This of course requires that hcid will be started with -s to enable the SDP server
53
54 #Following services can be enabled so far:
55 #       --enable-network
56 #       --enable-serial
57 #       --enable-input
58 #       --enable-audio
59 #       --enable-echo
60
61 #There is no need to modify any init script. They will be started
62 #automatically or on demand. Only /etc/bluetooth/*.service files should
63 #be patched to change name or the autostart value.
64 #       --enable-configfile
65 #       --enable-initscripts
66
67 #For even smaller -doc packages
68 #       --disable-manpages
69 #       --disable-pcmciarules
70
71 #I haven't seen any embedded device with HID proxy support. So simply
72 #disable it:
73 #       --disable-hid2hci
74
75 OE_LT_RPATH_ALLOW = "any"
76 OE_LT_RPATH_ALLOW[export]="1"
77
78 do_install_append() {
79         install -d ${D}${base_sbindir} ${D}${base_bindir}/  ${D}${sysconfdir}/apm/event.d/
80         if [ "${sbindir}" != "${base_sbindir}" ]; then
81                 mv ${D}${sbindir}/* ${D}${base_sbindir}/
82                 rmdir ${D}${sbindir}
83         fi
84         if [ "${bindir}" != "${base_bindir}" ]; then
85                 mv ${D}${bindir}/* ${D}${base_bindir}/
86                 rmdir ${D}${bindir}
87         fi
88         chmod u+s ${D}${base_sbindir}/hciattach ${D}${base_sbindir}/hciconfig
89         install -m 0644 ${WORKDIR}/hcid.conf ${D}${sysconfdir}/bluetooth/
90         install -m 0644 ${S}/rfcomm/rfcomm.conf ${D}${sysconfdir}/bluetooth/
91         install -m 0755 ${S}/daemon/.libs/passkey-agent ${D}${base_bindir}/ ||true 
92                 install -m 0755 ${S}/test/.libs/passkey-agent ${D}${base_bindir}/ ||true
93 }
94
95
96 INITSCRIPT_NAME = "bluetooth"
97 INITSCRIPT_PARAMS = "defaults 23 19"
98
99
100 PACKAGES =+ "${PN}-compat"
101
102
103 FILES_${PN} = " \
104                ${base_sbindir}/hcid \
105                ${libdir}/bluetooth \
106                ${sysconfdir}/init.d/bluetooth \
107                ${sysconfdir}/bluetooth/*.service \
108                ${sysconfdir}/bluetooth/hcid.conf \
109                ${sysconfdir}/default \
110                ${sysconfdir}/dbus-1 \
111                ${base_sbindir}/hciattach \
112               "
113
114 FILES_${PN}-dbg += " \
115                    ${libdir}/bluetooth/.debug \
116                    ${libdir}/cups/backend/.debug \
117                    ${libdir}/alsa-lib/.debug \
118                   " 
119
120 FILES_${PN}-compat = " \
121                     ${base_bindir}/sdptool \
122                     ${base_bindir}/dund \
123                     ${base_bindir}/rctest \
124                     ${base_bindir}/ciptool \
125                     ${base_bindir}/l2test \
126                     ${base_bindir}/rfcomm \
127                     ${base_bindir}/hcitool \
128                     ${base_bindir}/pand \
129                     ${base_bindir}/hidd \
130                     ${base_bindir}/l2ping \
131                     ${base_sbindir}/hciconfig \
132                     ${base_sbindir}/bccmd \
133                     ${base_sbindir}/hciemu \
134                     ${base_sbindir}/hid2hci \
135                     ${base_bindir}/passkey-agent \
136                     ${sysconfdir}/bluetooth/rfcomm.conf \
137                    " 
138
139
140
141
142
143
144
145
146
147
148