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