1 # Do not create provides fro extension-tm1 because the main package
2 # should anchor any reverse-dependencies
3 %global __provides_exclude_from ^(.*\\.tm1)$
5 #%define __spec_check_pre exit 0
7 #%define with_libcapng --enable-capng
8 %define _libpath /usr/lib
10 Summary: Bluetooth Stack for Linux
13 Group: Network & Connectivity/Bluetooth
14 License: GPL-2.0+ and LGPL-2.1+
15 URL: http://www.bluez.org/
16 Source: bluez-%{version}.tar.gz
17 Source2: bluez-coldplug.init
18 Source3: bluetooth.sysconfig
20 Source5: baselibs.conf
21 Source7: bluetooth.modprobe
22 Source101: obex-root-setup
23 Source102: create-symlinks
25 Source1001: bluez.manifest
26 #Patch1 : bluez-ncurses.patch
27 #Patch2 : disable-eir-unittest.patch
28 #Requires: dbus >= 0.60
29 #BuildRequires: pkgconfig(libudev)
30 BuildRequires: pkgconfig(dbus-1)
31 BuildRequires: pkgconfig(iniparser)
32 BuildRequires: pkgconfig(libxml-2.0)
33 BuildRequires: pkgconfig(json-c)
34 BuildRequires: pkgconfig(ell)
35 #BuildRequires: pkgconfig(glib-2.0)
36 #BuildRequires: pkgconfig(ncurses)
39 #BuildRequires: readline-devel
40 #BuildRequires: openssl-devel
42 BuildRequires: libcap-ng-devel
43 BuildRequires: systemd
45 BuildRequires: pkgconfig(alsa)
46 BuildRequires: automake
47 BuildRequires: check-devel
48 BuildRequires: glib2-devel >= 2.16
49 BuildRequires: libsndfile-devel
50 BuildRequires: libtool
51 BuildRequires: libudev-devel
52 BuildRequires: pkg-config
53 BuildRequires: readline-devel
55 BuildRequires: pkgconfig(libtzplatform-config)
56 Requires: %{name}-compat = %{version}-%{release}
57 Requires: security-config
58 Recommends: %{name}-profile_common = %{version}-%{release}
61 The Bluetooth stack for Linux.
63 %package extension-bredr
64 Summary: Bluez extension for BREDR functionality
65 Requires: %{name} = %{version}-%{release}
66 Conflicts: %{name}-extension-le = %{version}-%{release}
67 %description extension-bredr
68 Bluez extension for BREDR functionality
71 Summary: Bluez extension for LE functionality
72 Requires: %{name} = %{version}-%{release}
73 Conflicts: %{name}-extension-bredr = %{version}-%{release}
74 %description extension-le
75 Bluez extension for LE functionality
78 Summary: OBEX Server A basic OBEX server implementation
79 Group: Network & Connectivity/Bluetooth
80 Requires: tizen-platform-config-tools
83 OBEX Server A basic OBEX server implementation.
86 Summary: Tools for testing of various Bluetooth-functions
88 Group: Development/Tools
90 Requires: python-gobject
93 Contains a few tools for testing various bluetooth functions. The
94 BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
96 %package profile_common
97 Summary: Modified bluez for mobile/common profile
98 Provides: %{name}-compat = %{version}-%{release}
99 Provides: %{name}-profile_mobile = %{version}-%{release}
100 Provides: %{name}-profile_ivi = %{version}-%{release}
101 Conflicts: %{name}-profile_wearable
102 Conflicts: %{name}-profile_tv
103 %description profile_common
104 Bluez default service script for Tizen (mobile/common profile)
106 %package profile_wearable
107 Summary: Modified bluez for wearable profile
108 Provides: %{name}-compat = %{version}-%{release}
109 Conflicts: %{name}-profile_common
110 Conflicts: %{name}-profile_tv
111 %description profile_wearable
112 Bluez modified service script for Tizen wearable
115 Summary: Modified bluez for wearable profile
116 Provides: %{name}-compat = %{version}-%{release}
117 Conflicts: %{name}-profile_common
118 Conflicts: %{name}-profile_wearable
119 %description profile_tv
120 Bluez modified service script for Tizen TV
122 %package plugin-headless
123 Summary: Bluez headless plugin
124 Requires: %{name}-compat = %{version}-%{release}
125 %description plugin-headless
126 This package is Bluez plugin to manager headless device
128 %package plugin-keyboard
129 Summary: Bluez keyboard plugin
130 Requires: %{name}-compat = %{version}-%{release}
131 %description plugin-keyboard
132 This package is Bluez plugin to manager keyboard device
134 %package plugin-robot
135 Summary: Bluez robot plugin
136 Requires: %{name}-compat = %{version}-%{release}
137 %description plugin-robot
138 This package is Bluez plugin to manager robot device
141 Summary: contains binaries for bluetooth mesh
142 Requires: %{name}-compat = %{version}-%{release}
145 Contains bluetooth mesh daemon
154 #if "{?profile}" == "ivi"
155 # TIZEN_FEATURE_BLUEZ_BRCM_CHIP: only in tools/hciattach.c ==> RUNTIME! (profile.h)
158 #if "{?profile}" == "wearable"
159 # TIZEN_FEATURE_BLUEZ_SMS_ONLY: only in obexd/plugins/messages-tizen.c ==> RUNTIME! (profile.h)
160 # TIZEN_FEATURE_BLUEZ_BRCM_QOS: only in profiles/audio/avdtp.c ==> RUNTIME! (profile.h)
161 # TIZEN_FEATURE_BLUEZ_ROLE_CHANGE: only in profiles/audio/avdtp.c ==> RUNTIME! (profile.h)
162 # TIZEN_FEATURE_BLUEZ_CONFIRM_ONLY: only in src/device.c ==> RUNTIME! (profile.h)
168 export CFLAGS_DEFAULT="$CFLAGS"
171 export CFLAGS+=" -Wno-stringop-truncation -Wno-format-truncation -Wno-address-of-packed-member"
173 export LDFLAGS=" -lncurses -Wl,--as-needed "
174 export CFLAGS+=" -Werror -DTIZEN_FEATURE_BLUEZ_MODIFY -DTIZEN_FEATURE_BLUEZ_A2DP_MULTISTREAM -DTIZEN_FEATURE_BLUEZ_PBAP_SIM -DTIZEN_FEATURE_BLUEZ_AVRCP_TARGET -DTIZEN_FEATURE_BLUEZ_AVRCP_CONTROL -DTIZEN_FEATURE_BLUEZ_AVRCP_TARGET -DENABLE_AVRCP_CATEGORY1 -DTIZEN_BT_HID_DEVICE_ENABLE"
178 export CFLAGS+=" -DARCH64"
183 export CFLAGS+=" -DARCH64"
186 %reconfigure --disable-static \
187 --sysconfdir=%{_sysconfdir} \
188 --localstatedir=%{_localstatedir} \
189 --with-systemdsystemunitdir=%{_libpath}/systemd/system \
190 --with-systemduserunitdir=%{_libpath}/systemd/user \
191 --libexecdir=%{_libexecdir} \
198 --enable-hid2hci=yes \
200 --enable-gstreamer=no \
203 --enable-proximity=yes \
208 --with-telephony=tizen \
213 --enable-experimental \
214 --enable-autopyypair=no \
215 --enable-tizenunusedplugin=no \
216 --disable-crypto-tests \
217 --enable-external-ell
219 make %{?_smp_mflags} all V=1
224 cp -a %{buildroot}%{_libexecdir}/bluetooth/bluetoothd le/
232 export CFLAGS="$CFLAGS_DEFAULT"
235 export CFLAGS+=" -Wno-stringop-truncation -Wno-format-truncation -Wno-address-of-packed-member"
237 export LDFLAGS=" -lncurses -Wl,--as-needed "
238 export CFLAGS+=" -Werror -DTIZEN_FEATURE_BLUEZ_MODIFY -DTIZEN_FEATURE_BLUEZ_A2DP_MULTISTREAM -DTIZEN_FEATURE_BLUEZ_PBAP_SIM -DTIZEN_FEATURE_BLUEZ_AVRCP_TARGET -DTIZEN_FEATURE_BLUEZ_AVRCP_CONTROL -DTIZEN_FEATURE_BLUEZ_AVRCP_TARGET -DENABLE_AVRCP_CATEGORY1 -DTIZEN_BT_HID_DEVICE_ENABLE"
242 export CFLAGS+=" -DARCH64"
247 export CFLAGS+=" -DARCH64"
250 %reconfigure --disable-static \
251 --sysconfdir=%{_sysconfdir} \
252 --localstatedir=%{_localstatedir} \
253 --with-systemdsystemunitdir=%{_libpath}/systemd/system \
254 --with-systemduserunitdir=%{_libpath}/systemd/user \
255 --libexecdir=%{_libexecdir} \
264 --enable-hid2hci=yes \
266 --enable-gstreamer=no \
269 --enable-health=yes \
273 --with-telephony=tizen \
277 --enable-experimental \
278 --enable-autopair=no \
281 --enable-tizenunusedplugin=no \
282 --disable-crypto-tests \
283 --enable-external-ell
285 make %{?_smp_mflags} all V=1
290 cp -a %{buildroot}%{_libexecdir}/bluetooth/bluetoothd bredr/
298 export CFLAGS="$CFLAGS_DEFAULT"
301 export CFLAGS+=" -Wno-stringop-truncation -Wno-format-truncation -Wno-address-of-packed-member"
303 export LDFLAGS=" -lncurses -Wl,--as-needed "
304 export CFLAGS+=" -Werror -DTIZEN_FEATURE_BLUEZ_MODIFY -DTIZEN_FEATURE_BLUEZ_A2DP_MULTISTREAM -DTIZEN_FEATURE_BLUEZ_PBAP_SIM -DTIZEN_FEATURE_BLUEZ_AVRCP_TARGET -DTIZEN_FEATURE_BLUEZ_AVRCP_CONTROL -DTIZEN_FEATURE_BLUEZ_AVRCP_TARGET -DENABLE_AVRCP_CATEGORY1 -DTIZEN_BT_HID_DEVICE_ENABLE"
308 export CFLAGS+=" -DARCH64"
313 export CFLAGS+=" -DARCH64"
316 %reconfigure --disable-static \
317 --sysconfdir=%{_sysconfdir} \
318 --localstatedir=%{_localstatedir} \
319 --with-systemdsystemunitdir=%{_libpath}/systemd/system \
320 --with-systemduserunitdir=%{_libpath}/systemd/user \
321 --libexecdir=%{_libexecdir} \
330 --enable-hid2hci=yes \
332 --enable-gstreamer=no \
335 --enable-health=yes \
336 --enable-proximity=yes \
340 --with-telephony=tizen \
346 --enable-experimental \
347 --enable-autopair=no \
350 --enable-tizenunusedplugin=no \
351 --disable-crypto-tests \
352 --enable-external-ell
354 make %{?_smp_mflags} all V=1
363 for FILE in bluetoothd; do mv "$FILE" "%{buildroot}%{_libexecdir}/bluetooth/$FILE.bredr"; done
367 for FILE in bluetoothd; do mv "$FILE" "%{buildroot}%{_libexecdir}/bluetooth/$FILE.le"; done
371 rm -rvf $RPM_BUILD_ROOT/%{_libdir}/gstreamer-*
372 #install --mode=0755 -D %{S:4} $RPM_BUILD_ROOT/usr/lib/udev/bluetooth.sh
373 install --mode=0644 -D %{S:7} $RPM_BUILD_ROOT/%{_sysconfdir}/modprobe.d/50-bluetooth.conf
375 # no idea why this is suddenly necessary...
376 install --mode 0755 -d $RPM_BUILD_ROOT/var/lib/bluetooth
378 install -D -m 0644 src/main_w.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.wearable
379 install -D -m 0644 src/main_m.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf
380 install -D -m 0644 src/main_headless.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.headless
381 install -D -m 0644 src/main_keyboard.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.keyboard
382 install -D -m 0644 src/main_robot.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.robot
384 #install -D -m 0644 src/org.bluez.service %{buildroot}%{_datadir}/dbus-1/system-services/org.bluez.service
386 install -D -m 0644 src/bluetooth.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
387 #install -D -m 0644 profiles/audio/audio.conf %{buildroot}%{_sysconfdir}/bluetooth/audio.conf
388 #install -D -m 0644 profiles/network/network.conf %{buildroot}%{_sysconfdir}/bluetooth/network.conf
390 #install -D -m 0644 COPYING %{buildroot}%{_datadir}/license/bluez
391 #install -D -m 0644 COPYING %{buildroot}%{_datadir}/license/libbluetooth3
392 #install -D -m 0644 COPYING %{buildroot}%{_datadir}/license/libbluetooth-devel
394 #install -D -m 0755 %SOURCE101 %{buildroot}%{_bindir}/obex-root-setup
395 #install -D -m 0755 %SOURCE102 %{buildroot}%{_sysconfdir}/obex/root-setup.d/000_create-symlinks
396 #install -D -m 0755 %SOURCE103 %{buildroot}%{_bindir}/obex.sh
397 install -D -m 0755 tools/btiotest $RPM_BUILD_ROOT/%{_bindir}/
398 install -D -m 0755 tools/bluetooth-player $RPM_BUILD_ROOT/%{_bindir}/
399 #install -D -m 0755 tools/mpris-player $RPM_BUILD_ROOT/%{_bindir}/
400 install -D -m 0755 tools/btmgmt $RPM_BUILD_ROOT/%{_bindir}/
401 install -D -m 0755 tools/scotest $RPM_BUILD_ROOT/%{_bindir}/
402 install -D -m 0755 tools/bluemoon $RPM_BUILD_ROOT/%{_bindir}/
403 install -D -m 0755 attrib/gatttool $RPM_BUILD_ROOT/%{_bindir}/
404 install -D -m 0755 tools/meshctl $RPM_BUILD_ROOT/%{_bindir}/
405 install -D -m 0755 tools/mesh-cfgclient $RPM_BUILD_ROOT/%{_bindir}/
408 install -D -m 0644 mesh/mesh-main.conf %{buildroot}%{_sysconfdir}/bluetooth/mesh-main.conf
410 install -D -m 0755 tools/obexctl %{buildroot}%{_bindir}/obexctl
412 install -D -m 0644 obexd/src/obex.service %{buildroot}%{_libpath}/systemd/system/
414 install -D -m 0644 src/bluetooth.service %{buildroot}%{_libpath}/systemd/system/bluez-start.service
416 %post -n bluez-extension-bredr
417 pushd %{_libexecdir}/bluetooth
418 for FILE in bluetoothd.bredr; do mv "$FILE" "${FILE%.bredr}"; done
422 %post -n bluez-extension-le
423 pushd %{_libexecdir}/bluetooth
424 for FILE in bluetoothd.le; do mv "$FILE" "${FILE%.le}"; done
429 %manifest %{name}.manifest
430 %defattr(-, root, root)
432 #%{_sysconfdir}/bluetooth/audio.conf
433 #%{_sysconfdir}/bluetooth/network.conf
434 #%{_sysconfdir}/bluetooth/rfcomm.conf
435 %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
437 %attr(750, network_fw, network_fw)%{_bindir}/hcitool
442 %{_bindir}/mpris-proxy
447 %attr(750, network_fw, network_fw)%{_bindir}/btattach
448 %attr(750, network_fw, network_fw)%{_bindir}/hciattach
449 %attr(750, network_fw, network_fw)%{_bindir}/hciconfig
450 %attr(755, network_fw, network_fw)%{_libexecdir}/bluetooth/bluetoothd
451 %exclude %{_libexecdir}/bluetooth/bluetoothd.bredr
452 %exclude %{_libexecdir}/bluetooth/bluetoothd.le
453 %exclude %{_includedir}/bluetooth/*
454 %exclude %{_libdir}/pkgconfig/bluez.pc
459 %{_unitdir}/bluez-start.service
460 %exclude %{_unitdir}/bluetooth.service
462 %files -n bluez-extension-bredr
463 %manifest %{name}.manifest
464 %defattr(-, root, root)
465 %{_libexecdir}/bluetooth/bluetoothd.bredr
467 %files -n bluez-extension-le
468 %manifest %{name}.manifest
469 %defattr(-, root, root)
470 %{_libexecdir}/bluetooth/bluetoothd.le
471 %config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
472 %dir /var/lib/bluetooth
473 %dir %{_sysconfdir}/modprobe.d
474 %config(noreplace) %{_sysconfdir}/modprobe.d/50-bluetooth.conf
477 %manifest %{name}.manifest
478 %defattr(-, root, root)
480 %{_sysconfdir}/dbus-1/system.d/bluetooth-mesh.conf
481 %attr(755, network_fw, network_fw)%{_libexecdir}/bluetooth/bluetooth-meshd
482 %{_libpath}/systemd/system/bluetooth-mesh.service
483 %exclude %{_datadir}/dbus-1/system-services/org.bluez.mesh.service
484 %exclude /usr/lib/debug/*
485 %{_sysconfdir}/bluetooth/mesh-main.conf
488 %manifest %{name}.manifest
489 %defattr(-,root,root,-)
490 %{_libexecdir}/bluetooth/obexd
491 %{_libpath}/systemd/system/obex.service
492 %{_datadir}/dbus-1/system-services/org.bluez.obex.service
493 #%{_sysconfdir}/obex/root-setup.d/000_create-symlinks
494 #%{_bindir}/obex-root-setup
499 %manifest %{name}.manifest
500 %defattr(-,root,root)
501 %{_libdir}/bluez/test/*
504 %{_bindir}/bluetoothctl
506 %{_bindir}/mesh-cfgclient
508 #%{_bindir}/mpris-player
509 %{_bindir}/bluetooth-player
518 %exclude /usr/lib/debug/*
519 %{_libdir}/libbluetooth.so*
523 %post profile_wearable
524 ln -sf main.conf.wearable %{_sysconfdir}/bluetooth/main.conf
525 %preun profile_wearable
526 rm %{_sysconfdir}/bluetooth/main.conf
527 %files profile_wearable
528 %manifest %{name}.manifest
529 %{_sysconfdir}/bluetooth/main.conf.wearable
532 %manifest %{name}.manifest
533 %{_sysconfdir}/bluetooth/main.conf
534 %exclude %{_datadir}/dbus-1/system-services/org.bluez.service
536 %files profile_common
537 %manifest %{name}.manifest
538 %{_sysconfdir}/bluetooth/main.conf
540 %post plugin-headless
541 ln -sf main.conf.headless %{_sysconfdir}/bluetooth/main.conf
542 %preun plugin-headless
543 rm %{_sysconfdir}/bluetooth/main.conf
544 %files plugin-headless
545 %manifest %{name}.manifest
546 %{_sysconfdir}/bluetooth/main.conf.headless
548 %post plugin-keyboard
549 ln -sf main.conf.keyboard %{_sysconfdir}/bluetooth/main.conf
550 %preun plugin-keyboard
551 rm %{_sysconfdir}/bluetooth/main.conf
552 %files plugin-keyboard
553 %manifest %{name}.manifest
554 %{_sysconfdir}/bluetooth/main.conf.keyboard
557 ln -sf main.conf.robot %{_sysconfdir}/bluetooth/main.conf
559 rm %{_sysconfdir}/bluetooth/main.conf
561 %manifest %{name}.manifest
562 %{_sysconfdir}/bluetooth/main.conf.robot