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
135 Summary: contains binaries for bluetooth mesh
136 Requires: %{name}-compat = %{version}-%{release}
139 Contains bluetooth mesh daemon
148 #if "{?profile}" == "ivi"
149 # TIZEN_FEATURE_BLUEZ_BRCM_CHIP: only in tools/hciattach.c ==> RUNTIME! (profile.h)
152 #if "{?profile}" == "wearable"
153 # TIZEN_FEATURE_BLUEZ_SMS_ONLY: only in obexd/plugins/messages-tizen.c ==> RUNTIME! (profile.h)
154 # TIZEN_FEATURE_BLUEZ_BRCM_QOS: only in profiles/audio/avdtp.c ==> RUNTIME! (profile.h)
155 # TIZEN_FEATURE_BLUEZ_ROLE_CHANGE: only in profiles/audio/avdtp.c ==> RUNTIME! (profile.h)
156 # TIZEN_FEATURE_BLUEZ_CONFIRM_ONLY: only in src/device.c ==> RUNTIME! (profile.h)
162 export CFLAGS_DEFAULT="$CFLAGS"
165 export CFLAGS+=" -Wno-stringop-truncation -Wno-format-truncation -Wno-address-of-packed-member"
167 export LDFLAGS=" -lncurses -Wl,--as-needed "
168 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"
172 export CFLAGS+=" -DARCH64"
177 export CFLAGS+=" -DARCH64"
180 %reconfigure --disable-static \
181 --sysconfdir=%{_sysconfdir} \
182 --localstatedir=%{_localstatedir} \
183 --with-systemdsystemunitdir=%{_libpath}/systemd/system \
184 --with-systemduserunitdir=%{_libpath}/systemd/user \
185 --libexecdir=%{_libexecdir} \
192 --enable-hid2hci=yes \
194 --enable-gstreamer=no \
197 --enable-proximity=yes \
202 --with-telephony=tizen \
207 --enable-experimental \
208 --enable-autopyypair=no \
209 --enable-tizenunusedplugin=no \
210 --disable-crypto-tests \
211 --enable-external-ell
213 make %{?_smp_mflags} all V=1
218 cp -a %{buildroot}%{_libexecdir}/bluetooth/bluetoothd le/
226 export CFLAGS="$CFLAGS_DEFAULT"
229 export CFLAGS+=" -Wno-stringop-truncation -Wno-format-truncation -Wno-address-of-packed-member"
231 export LDFLAGS=" -lncurses -Wl,--as-needed "
232 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"
236 export CFLAGS+=" -DARCH64"
241 export CFLAGS+=" -DARCH64"
244 %reconfigure --disable-static \
245 --sysconfdir=%{_sysconfdir} \
246 --localstatedir=%{_localstatedir} \
247 --with-systemdsystemunitdir=%{_libpath}/systemd/system \
248 --with-systemduserunitdir=%{_libpath}/systemd/user \
249 --libexecdir=%{_libexecdir} \
258 --enable-hid2hci=yes \
260 --enable-gstreamer=no \
263 --enable-health=yes \
267 --with-telephony=tizen \
271 --enable-experimental \
272 --enable-autopair=no \
275 --enable-tizenunusedplugin=no \
276 --disable-crypto-tests \
277 --enable-external-ell
279 make %{?_smp_mflags} all V=1
284 cp -a %{buildroot}%{_libexecdir}/bluetooth/bluetoothd bredr/
292 export CFLAGS="$CFLAGS_DEFAULT"
295 export CFLAGS+=" -Wno-stringop-truncation -Wno-format-truncation -Wno-address-of-packed-member"
297 export LDFLAGS=" -lncurses -Wl,--as-needed "
298 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"
302 export CFLAGS+=" -DARCH64"
307 export CFLAGS+=" -DARCH64"
310 %reconfigure --disable-static \
311 --sysconfdir=%{_sysconfdir} \
312 --localstatedir=%{_localstatedir} \
313 --with-systemdsystemunitdir=%{_libpath}/systemd/system \
314 --with-systemduserunitdir=%{_libpath}/systemd/user \
315 --libexecdir=%{_libexecdir} \
324 --enable-hid2hci=yes \
326 --enable-gstreamer=no \
329 --enable-health=yes \
330 --enable-proximity=yes \
334 --with-telephony=tizen \
340 --enable-experimental \
341 --enable-autopair=no \
344 --enable-tizenunusedplugin=no \
345 --disable-crypto-tests \
346 --enable-external-ell
348 make %{?_smp_mflags} all V=1
357 for FILE in bluetoothd; do mv "$FILE" "%{buildroot}%{_libexecdir}/bluetooth/$FILE.bredr"; done
361 for FILE in bluetoothd; do mv "$FILE" "%{buildroot}%{_libexecdir}/bluetooth/$FILE.le"; done
365 rm -rvf $RPM_BUILD_ROOT/%{_libdir}/gstreamer-*
366 #install --mode=0755 -D %{S:4} $RPM_BUILD_ROOT/usr/lib/udev/bluetooth.sh
367 install --mode=0644 -D %{S:7} $RPM_BUILD_ROOT/%{_sysconfdir}/modprobe.d/50-bluetooth.conf
369 # no idea why this is suddenly necessary...
370 install --mode 0755 -d $RPM_BUILD_ROOT/var/lib/bluetooth
372 install -D -m 0644 src/main_w.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.wearable
373 install -D -m 0644 src/main_m.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf
374 install -D -m 0644 src/main_headless.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.headless
375 install -D -m 0644 src/main_keyboard.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.keyboard
377 #install -D -m 0644 src/org.bluez.service %{buildroot}%{_datadir}/dbus-1/system-services/org.bluez.service
379 install -D -m 0644 src/bluetooth.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
380 #install -D -m 0644 profiles/audio/audio.conf %{buildroot}%{_sysconfdir}/bluetooth/audio.conf
381 #install -D -m 0644 profiles/network/network.conf %{buildroot}%{_sysconfdir}/bluetooth/network.conf
383 #install -D -m 0644 COPYING %{buildroot}%{_datadir}/license/bluez
384 #install -D -m 0644 COPYING %{buildroot}%{_datadir}/license/libbluetooth3
385 #install -D -m 0644 COPYING %{buildroot}%{_datadir}/license/libbluetooth-devel
387 #install -D -m 0755 %SOURCE101 %{buildroot}%{_bindir}/obex-root-setup
388 #install -D -m 0755 %SOURCE102 %{buildroot}%{_sysconfdir}/obex/root-setup.d/000_create-symlinks
389 #install -D -m 0755 %SOURCE103 %{buildroot}%{_bindir}/obex.sh
390 install -D -m 0755 tools/btiotest $RPM_BUILD_ROOT/%{_bindir}/
391 install -D -m 0755 tools/bluetooth-player $RPM_BUILD_ROOT/%{_bindir}/
392 #install -D -m 0755 tools/mpris-player $RPM_BUILD_ROOT/%{_bindir}/
393 install -D -m 0755 tools/btmgmt $RPM_BUILD_ROOT/%{_bindir}/
394 install -D -m 0755 tools/scotest $RPM_BUILD_ROOT/%{_bindir}/
395 install -D -m 0755 tools/bluemoon $RPM_BUILD_ROOT/%{_bindir}/
396 install -D -m 0755 attrib/gatttool $RPM_BUILD_ROOT/%{_bindir}/
397 install -D -m 0755 tools/meshctl $RPM_BUILD_ROOT/%{_bindir}/
398 install -D -m 0755 tools/mesh-cfgclient $RPM_BUILD_ROOT/%{_bindir}/
401 install -D -m 0644 mesh/mesh-main.conf %{buildroot}%{_sysconfdir}/bluetooth/mesh-main.conf
403 install -D -m 0755 tools/obexctl %{buildroot}%{_bindir}/obexctl
405 install -D -m 0644 obexd/src/obex.service %{buildroot}%{_libpath}/systemd/system/
407 install -D -m 0644 src/bluetooth.service %{buildroot}%{_libpath}/systemd/system/bluez-start.service
409 %post -n bluez-extension-bredr
410 pushd %{_libexecdir}/bluetooth
411 for FILE in bluetoothd.bredr; do mv "$FILE" "${FILE%.bredr}"; done
415 %post -n bluez-extension-le
416 pushd %{_libexecdir}/bluetooth
417 for FILE in bluetoothd.le; do mv "$FILE" "${FILE%.le}"; done
422 %manifest %{name}.manifest
423 %defattr(-, root, root)
425 #%{_sysconfdir}/bluetooth/audio.conf
426 #%{_sysconfdir}/bluetooth/network.conf
427 #%{_sysconfdir}/bluetooth/rfcomm.conf
428 %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
430 %attr(750, network_fw, network_fw)%{_bindir}/hcitool
435 %{_bindir}/mpris-proxy
440 %attr(750, network_fw, network_fw)%{_bindir}/btattach
441 %attr(750, network_fw, network_fw)%{_bindir}/hciattach
442 %attr(750, network_fw, network_fw)%{_bindir}/hciconfig
443 %attr(755, network_fw, network_fw)%{_libexecdir}/bluetooth/bluetoothd
444 %exclude %{_libexecdir}/bluetooth/bluetoothd.bredr
445 %exclude %{_libexecdir}/bluetooth/bluetoothd.le
446 %exclude %{_includedir}/bluetooth/*
447 %exclude %{_libdir}/pkgconfig/bluez.pc
452 %{_unitdir}/bluez-start.service
453 %exclude %{_unitdir}/bluetooth.service
455 %files -n bluez-extension-bredr
456 %manifest %{name}.manifest
457 %defattr(-, root, root)
458 %{_libexecdir}/bluetooth/bluetoothd.bredr
460 %files -n bluez-extension-le
461 %manifest %{name}.manifest
462 %defattr(-, root, root)
463 %{_libexecdir}/bluetooth/bluetoothd.le
464 %config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
465 %dir /var/lib/bluetooth
466 %dir %{_sysconfdir}/modprobe.d
467 %config(noreplace) %{_sysconfdir}/modprobe.d/50-bluetooth.conf
470 %manifest %{name}.manifest
471 %defattr(-, root, root)
473 %{_sysconfdir}/dbus-1/system.d/bluetooth-mesh.conf
474 %attr(755, network_fw, network_fw)%{_libexecdir}/bluetooth/bluetooth-meshd
475 %{_libpath}/systemd/system/bluetooth-mesh.service
476 %exclude %{_datadir}/dbus-1/system-services/org.bluez.mesh.service
477 %exclude /usr/lib/debug/*
478 %{_sysconfdir}/bluetooth/mesh-main.conf
481 %manifest %{name}.manifest
482 %defattr(-,root,root,-)
483 %{_libexecdir}/bluetooth/obexd
484 %{_libpath}/systemd/system/obex.service
485 %{_datadir}/dbus-1/system-services/org.bluez.obex.service
486 #%{_sysconfdir}/obex/root-setup.d/000_create-symlinks
487 #%{_bindir}/obex-root-setup
492 %manifest %{name}.manifest
493 %defattr(-,root,root)
494 %{_libdir}/bluez/test/*
497 %{_bindir}/bluetoothctl
499 %{_bindir}/mesh-cfgclient
501 #%{_bindir}/mpris-player
502 %{_bindir}/bluetooth-player
511 %exclude /usr/lib/debug/*
512 %{_libdir}/libbluetooth.so*
516 %post profile_wearable
517 ln -sf main.conf.wearable %{_sysconfdir}/bluetooth/main.conf
518 %preun profile_wearable
519 rm %{_sysconfdir}/bluetooth/main.conf
520 %files profile_wearable
521 %manifest %{name}.manifest
522 %{_sysconfdir}/bluetooth/main.conf.wearable
525 %manifest %{name}.manifest
526 %{_sysconfdir}/bluetooth/main.conf
527 %exclude %{_datadir}/dbus-1/system-services/org.bluez.service
529 %files profile_common
530 %manifest %{name}.manifest
531 %{_sysconfdir}/bluetooth/main.conf
533 %post plugin-headless
534 ln -sf main.conf.headless %{_sysconfdir}/bluetooth/main.conf
535 %preun plugin-headless
536 rm %{_sysconfdir}/bluetooth/main.conf
537 %files plugin-headless
538 %manifest %{name}.manifest
539 %{_sysconfdir}/bluetooth/main.conf.headless
541 %post plugin-keyboard
542 ln -sf main.conf.keyboard %{_sysconfdir}/bluetooth/main.conf
543 %preun plugin-keyboard
544 rm %{_sysconfdir}/bluetooth/main.conf
545 %files plugin-keyboard
546 %manifest %{name}.manifest
547 %{_sysconfdir}/bluetooth/main.conf.keyboard