Fix bug:TIVI-374[2.0] no hidd binary, which blocks bluetooth keyboard connection
[profile/ivi/bluez.git] / packaging / bluez.spec
1 Name:       bluez
2 Summary:    Bluetooth utilities
3 Version:    4.101
4 Release:    2
5 Group:      Applications/System
6 License:    GPLv2+
7 URL:        http://www.bluez.org/
8 Source0:    http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz
9 Patch1 :    bluez-ncurses.patch
10 Requires:   dbus >= 0.60
11 Requires:   pciutils
12 BuildRequires:  pkgconfig(dbus-1)
13 BuildRequires:  pkgconfig(glib-2.0)
14 BuildRequires:  flex
15 BuildRequires:  bison
16 BuildRequires:  readline-devel
17
18 %description
19 Utilities for use in Bluetooth applications:
20         --dfutool
21         --hcitool
22         --l2ping
23         --rfcomm
24         --sdptool
25         --hciattach
26         --hciconfig
27         --hid2hci
28
29 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
30
31
32
33 %package -n libbluetooth3
34 Summary:    Libraries for use in Bluetooth applications
35 Group:      System/Libraries
36 Requires:   %{name} = %{version}-%{release}
37 Requires(post): /sbin/ldconfig
38 Requires(postun): /sbin/ldconfig
39
40 %description -n libbluetooth3
41 Libraries for use in Bluetooth applications.
42
43 %package -n libbluetooth-devel
44 Summary:    Development libraries for Bluetooth applications
45 Group:      Development/Libraries
46 Requires:   %{name} = %{version}-%{release}
47 Requires:   libbluetooth3 = %{version}
48
49 %description -n libbluetooth-devel
50 bluez-libs-devel contains development libraries and headers for
51 use in Bluetooth applications.
52
53 %package test
54 Summary:    Test Programs for BlueZ
55 Group:      Development/Tools
56 Requires:   %{name} = %{version}-%{release}
57 Requires:   dbus-python
58 Requires:   pygobject
59 Requires:   python-xml
60
61 %description test
62 Scripts for testing BlueZ and its functionality
63
64 %prep
65 %setup -q
66 %patch1 -p1
67
68
69 %build
70
71 export CFLAGS="${CFLAGS} -D__TIZEN_PATCH__ -D__BROADCOM_PATCH__ "
72 export LDFLAGS=" -lncurses -Wl,--as-needed "
73 %reconfigure --disable-static \
74                         --sysconfdir=%{_prefix}/etc \
75                         --localstatedir=/opt/var \
76                         --enable-pie \
77                         --enable-network \
78                         --enable-serial \
79                         --enable-input \
80                         --enable-usb=no \
81                         --enable-tools \
82                         --disable-bccmd \
83                         --enable-pcmcia=no \
84                         --enable-hid2hci=no \
85                         --enable-alsa=no \
86                         --enable-gstreamer=no \
87                         --disable-dfutool \
88                         --disable-cups \
89                         --enable-health \
90                         --enable-dbusoob \
91                         --with-telephony=ofono \
92                         --enable-test \
93                         --enable-hidd
94
95 make %{?jobs:-j%jobs}
96
97 %install
98 rm -rf %{buildroot}
99 %make_install
100
101 install -D -m 0644 audio/audio.conf %{buildroot}%{_prefix}/etc/bluetooth/audio.conf
102 install -D -m 0644 network/network.conf %{buildroot}%{_prefix}/etc/bluetooth/network.conf
103
104
105 %post -n libbluetooth3 -p /sbin/ldconfig
106
107 %postun -n libbluetooth3 -p /sbin/ldconfig
108
109
110 %files
111 %defattr(-,root,root,-)
112 %{_prefix}/etc/bluetooth/audio.conf
113 %{_prefix}/etc/bluetooth/main.conf
114 %{_prefix}/etc/bluetooth/network.conf
115 %{_prefix}/etc/bluetooth/rfcomm.conf
116 %{_prefix}/etc/dbus-1/system.d/bluetooth.conf
117 %{_datadir}/man/*/*
118 %{_sbindir}/bluetoothd
119 %{_sbindir}/hciconfig
120 %{_sbindir}/hciattach
121 %exclude %{_bindir}/ciptool
122 %{_bindir}/l2ping
123 %{_bindir}/sdptool
124 %{_bindir}/gatttool
125 %{_bindir}/rfcomm
126 %{_bindir}/hcitool
127 %dir %{_libdir}/bluetooth/plugins
128 %dir /opt/var/lib/bluetooth
129 %{_datadir}/dbus-1/system-services/org.bluez.service
130
131
132 %files -n libbluetooth3
133 %defattr(-,root,root,-)
134 %{_libdir}/libbluetooth.so.*
135
136
137 %files -n libbluetooth-devel
138 %defattr(-, root, root)
139 %{_includedir}/bluetooth/*
140 %{_libdir}/libbluetooth.so
141 %{_libdir}/pkgconfig/bluez.pc
142
143 %files test
144 %defattr(-,root,root,-)
145 %{_libdir}/bluez/test/*
146 %{_bindir}/hidd