Mesh: Enable Build & Export Mesh Framework API
[platform/core/connectivity/bluetooth-frwk.git] / packaging / bluetooth-frwk.spec
1 # Do not create provides from emulator .so files because the main package
2 # should anchor any reverse-dependencies
3 %global __provides_exclude_from ^(.*\\.emulator)$
4
5 %bcond_with x
6 %define _dumpdir /opt/etc/dump.d/module.d
7 %define _varlibdir /opt/var/lib
8
9 Name:       bluetooth-frwk
10 Summary:    Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
11 Version:    0.4.0
12 Release:    1
13 Group:      Network & Connectivity/Bluetooth
14 License:    Apache-2.0
15 Source0:    %{name}-%{version}.tar.gz
16 Source1001: bluetooth-frwk.manifest
17
18 Requires: bluetooth-tools
19
20 %define bt_bluez_hal ENABLED
21 %define bt_gatt_client_fd ENABLED
22 %define bt_permanent_log DISABLED
23 %define bt_http_proxy DISABLED
24 %define bt_factory_mode DISABLED
25 %define bt_avc_target ENABLED
26 %define bt_vendor_operation DISABLED
27
28 BuildRequires:  pkgconfig(aul)
29 %if %{bt_factory_mode} == ENABLED
30 BuildRequires:  pkgconfig(bincfg)
31 %endif
32 BuildRequires:  pkgconfig(dlog)
33 BuildRequires:  pkgconfig(glib-2.0)
34 BuildRequires:  pkgconfig(gio-2.0)
35 BuildRequires:  pkgconfig(gio-unix-2.0)
36 BuildRequires:  pkgconfig(syspopup-caller)
37 BuildRequires:  pkgconfig(vconf)
38 BuildRequires:  pkgconfig(libxml-2.0)
39 BuildRequires:  pkgconfig(capi-network-connection)
40 BuildRequires:  pkgconfig(alarm-service)
41 BuildRequires:  pkgconfig(capi-content-mime-type)
42 BuildRequires:  pkgconfig(eventsystem)
43 %if %{bt_http_proxy} == ENABLED
44 BuildRequires:  pkgconfig(libsoup-2.4)
45 %endif
46 BuildRequires:  pkgconfig(capi-network-tethering)
47 BuildRequires:  cmake
48 BuildRequires:  pkgconfig(cynara-client)
49 BuildRequires:  pkgconfig(cynara-creds-gdbus)
50 BuildRequires:  pkgconfig(libtzplatform-config)
51 BuildRequires:  pkgconfig(json-c)
52 BuildRequires:  pkgconfig(ell)
53 BuildRequires:  pkgconfig(storage)
54 BuildRequires:  pkgconfig(capi-system-info)
55 BuildRequires:  pkgconfig(capi-appfw-app-control)
56 BuildRequires:  pkgconfig(gmock)
57 BuildRequires:  pkgconfig(libactd)
58 BuildRequires:  pkgconfig(libsystemd-daemon)
59
60 Requires(post): /usr/bin/vconftool
61 Requires(post): /sbin/ldconfig
62 Requires(postun): /sbin/ldconfig
63
64 %description
65 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
66  This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
67
68 %package profile_common
69 Summary:    bluetooth-frwk service and conf files for common profile
70 Requires:   %{name} = %{version}-%{release}
71 Conflicts:  %{name}-profile_mobile
72 Conflicts:  %{name}-profile_wearable
73 Conflicts:  %{name}-profile_tv
74 Conflicts:  %{name}-profile_ivi
75 %description profile_common
76 Bluetooth framework configuration and service files for Tizen common profile
77
78 %package profile_mobile
79 Summary:    bluetooth-frwk service and conf files for mobile profile
80 Requires:   %{name} = %{version}-%{release}
81 Conflicts:  %{name}-profile_common
82 Conflicts:  %{name}-profile_wearable
83 Conflicts:  %{name}-profile_tv
84 Conflicts:  %{name}-profile_ivi
85 %description profile_mobile
86 Bluetooth framework configuration and service files for Tizen mobile profile
87
88 # extension-TM1
89 %ifarch %{ix86} || %{arm}
90 %package extension-TM1
91 Summary:    bluetooth-frwk service and conf files for mobile TM1
92 Requires:   %{name}-profile_mobile = %{version}-%{release}
93 %description extension-TM1
94 Bluetooth framework configuration and service files for Tizen mobile TM1
95 %endif
96
97 %package profile_wearable
98 Summary:    bluetooth-frwk service and conf files for wearable profile
99 Requires:   %{name} = %{version}-%{release}
100 Conflicts:  %{name}-profile_mobile
101 Conflicts:  %{name}-profile_common
102 Conflicts:  %{name}-profile_tv
103 Conflicts:  %{name}-profile_ivi
104 %description profile_wearable
105 Bluetooth framework configuration and service files for Tizen wearable profile
106
107 %package profile_tv
108 Summary:    bluetooth-frwk service and conf files for tv profile
109 Requires:   %{name} = %{version}-%{release}
110 Conflicts:  %{name}-profile_mobile
111 Conflicts:  %{name}-profile_wearable
112 Conflicts:  %{name}-profile_common
113 Conflicts:  %{name}-profile_ivi
114 %description profile_tv
115 Bluetooth framework configuration and service files for Tizen tv profile
116
117 %package profile_ivi
118 Summary:    bluetooth-frwk service and conf files for ivi profile
119 Requires:   %{name} = %{version}-%{release}
120 Conflicts:  %{name}-profile_mobile
121 Conflicts:  %{name}-profile_wearable
122 Conflicts:  %{name}-profile_tv
123 Conflicts:  %{name}-profile_common
124 %description profile_ivi
125 Bluetooth framework configuration and service files for Tizen ivi profile
126
127 %ifarch %{ix86} x86_64
128 %package extension-emulator
129 Summary:    bluetooth-frwk service and conf files for emulator
130 Requires:   %{name} = %{version}-%{release}
131 %description extension-emulator
132 bluetooth-frwk service and conf files for emulator
133 %endif // ifarch %{ix86} x86_64
134
135 %package devel
136 Summary:    Bluetooth framework for BlueZ and Obexd
137 Group:      Development/Libraries
138 Requires:   %{name} = %{version}-%{release}
139
140 %description devel
141 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
142 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
143
144 %package service
145 Summary:    Bluetooth Service daemon
146 Group:      Network & Connectivity/Bluetooth
147 Requires:   %{name} = %{version}-%{release}
148
149 %description service
150 This package is Bluetooth Service daemon to manage BT services.
151
152 %if %{bt_http_proxy} == ENABLED
153 %package httpproxy
154 Summary:    Bluetooth HTTP Proxy Service daemon
155 Group:      Network & Connectivity/Bluetooth
156 Requires:   %{name} = %{version}-%{release}
157
158 %description httpproxy
159 This package is Bluetooth HTTP Proxy Service daemon
160 %endif
161
162 %package otp
163 Summary:    Bluetooth OTP Service daemon
164 Group:      Network & Connectivity/Bluetooth
165 Requires:   %{name} = %{version}-%{release}
166
167 %description otp
168 This package is Bluetooth OTP Service daemon
169
170 %package core
171 Summary:    Bluetooth Core daemon
172 Group:      Network & Connectivity/Bluetooth
173 Requires:   %{name} = %{version}-%{release}
174
175 %description core
176 This package is Bluetooth core daemon to manage activation / deactivation.
177
178 %package test
179 Summary:    Bluetooth test application
180 Group:      Network & Connectivity/Bluetooth
181 Requires:   %{name} = %{version}-%{release}
182
183 %description test
184 This package is Bluetooth test application.
185
186 %package oal
187 Summary:    Bluetooth OAL
188 Group:      Network & Connectivity/Bluetooth
189 Requires:   %{name} = %{version}-%{release}
190
191 %description oal
192 This package is BT stack common interface.
193
194 %package plugin-headed
195 Summary:    Bluetooth plugin Headed
196 Group:      Network & Connectivity/Bluetooth
197 Requires:   %{name} = %{version}-%{release}
198
199 %description plugin-headed
200 This package is Bluetooth plugin to manage UI and syspopup
201
202 %package -n bluetooth-haltests
203 Summary: HAL Test package for bluetooth OAL
204 Group:   TO_BE/FILLED
205 Requires: %{name} = %{version}-%{release}
206
207 %description -n bluetooth-haltests
208 This package is C-API test application.
209
210 %prep
211 %setup -q
212 cp %{SOURCE1001} .
213
214
215 %build
216 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
217 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_OBEX"
218 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_PAN_NAP"
219 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_IPSP"
220 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
221 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
222 export CFLAGS="$CFLAGS -DTIZEN_GATT_CLIENT"
223 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_ACTD"
224
225 %define _servicefile packaging/bluetooth-frwk-common.service
226 %define _servicedir starter.target.wants
227
228 %if "%{?profile}" == "mobile"
229 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_NETWORK_TETHERING_ENABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED -DTIZEN_PROFILE_MOBILE -DTIZEN_FEATURE_TELEPHONY_ENABLED"
230 %if "%{?tizen_target_name}" == "TM1"
231 %define _servicefile packaging/bluetooth-frwk-mobile-sprd.service
232 %else
233 %define _servicefile packaging/bluetooth-frwk-mobile.service
234 %endif
235 %define _servicedir multi-user.target.wants
236 %endif
237
238 %if "%{?profile}" == "wearable"
239 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_WEARABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED"
240 %define _servicefile packaging/bluetooth-frwk-wearable.service
241 %define _servicedir multi-user.target.wants
242 %endif
243
244 %if "%{?profile}" == "tv"
245 export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV -DAUTO_ACCEPT"
246 %define _servicefile packaging/bluetooth-frwk-tv.service
247 %define _servicedir multi-user.target.wants
248 %endif
249
250 %if "%{?profile}" == "ivi"
251 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI"
252 %define _servicefile packaging/bluetooth-frwk-wearable.service
253 %define _servicedir multi-user.target.wants
254 %endif
255
256 %ifarch x86_64
257 #export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
258 export CFLAGS="$CFLAGS -fpie"
259 export CFLAGS+=" -DARCH64"
260 export CXXFLAGS+=" -DARCH64"
261 export FFLAGS+=" -DARCH64"
262 %else
263 export CFLAGS="$CFLAGS -fpie"
264 export LDFLAGS="$CFLAGS -pie"
265 %endif
266
267 %if %{bt_bluez_hal} == ENABLED
268 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT -DTIZEN_BT_HAL"
269 %else
270 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
271 %endif
272 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
273
274 %if %{bt_gatt_client_fd} == DISABLED
275 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_GATT_CLIENT_FD_DISABLE"
276 %endif
277
278 %if %{bt_permanent_log} == ENABLED
279 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_PERMANENT_LOG"
280 %endif
281
282 %if %{bt_http_proxy} == ENABLED
283 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_HTTP_PROXY"
284 %endif
285
286 %if %{bt_factory_mode} == ENABLED
287 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_FACTORY_MODE"
288 %endif
289
290 %if %{bt_avc_target} == ENABLED
291 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_AVC_TARGET"
292 %endif
293
294 %if %{bt_vendor_operation} == ENABLED
295 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_VENDOR_OPERATION"
296 %endif
297
298
299 %ifarch %{ix86} x86_64
300 export CFLAGS+=" -DTIZEN_TEST_EMUL"
301 export CXXFLAGS+=" -DTIZEN_TEST_EMUL"
302 export FFLAGS+=" -DTIZEN_TEST_EMUL"
303 %endif
304
305 %if %{bt_bluez_hal} == ENABLED
306 export BT_INCLUDE_OAL_BLUEZ=ENABLED
307 export CFLAGS="$CFLAGS -DTIZEN_BT_INCLUDE_OAL_BLUEZ"
308 %else
309 export BT_INCLUDE_OAL_BLUEZ=DISABLED
310 %endif
311
312 export CFLAGS_DEFAULT="$CFLAGS"
313 export CXXFLAGS_DEFAULT="$CXXFLAGS"
314 export FFLAGS_DEFAULT="$FFLAGS"
315
316 # extension-TM1
317 %ifarch %{ix86} || %{arm}
318 mkdir -p tm1
319 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
320 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
321 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
322
323 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
324 -DCMAKE_LIB_DIR=%{_libdir} \
325 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
326 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
327         -DLIBNOTIFY_SUPPORT=Off \
328         -DLIBNOTIFICATION_SUPPORT=Off
329 make %{?_smp_mflags}
330
331 %cmake
332
333 %make_install
334 cp %{buildroot}%{_bindir}/bt-core tm1/bt-core.tm1
335 %endif
336
337 # extension-emulator
338 %ifarch %{ix86} x86_64
339 export CFLAGS="${CFLAGS} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
340 export CXXFLAGS="${CXXFLAGS} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
341 export FFLAGS="${FFLAGS} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
342
343 mkdir -p build_emulator
344
345 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
346 -DCMAKE_LIB_DIR=%{_libdir} \
347 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
348 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
349         -DLIBNOTIFY_SUPPORT=Off \
350         -DLIBNOTIFICATION_SUPPORT=Off
351 make %{?_smp_mflags}
352
353 %cmake
354
355 %make_install
356 cp %{buildroot}%{_libdir}/libbluetooth-api.so* build_emulator/
357 pushd build_emulator/
358 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
359 popd
360 %endif
361
362 # non-extension-TM1 / non-extension-emulator
363
364 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
365 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
366 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
367
368 %ifarch aarch64
369 echo arch64
370 export CFLAGS+=" -DARCH64"
371 export CXXFLAGS+=" -DARCH64"
372 export FFLAGS+=" -DARCH64"
373 %endif
374
375 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
376 -DCMAKE_LIB_DIR=%{_libdir} \
377 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
378 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
379         -DLIBNOTIFY_SUPPORT=Off \
380         -DLIBNOTIFICATION_SUPPORT=Off
381 make %{?_smp_mflags}
382
383 %cmake
384
385 %install
386 rm -rf %{buildroot}
387 %make_install
388
389 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
390 mkdir -p %{buildroot}%{_unitdir}/delayed.target.wants
391 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
392 mkdir -p %{buildroot}/%{_prefix}/lib/udev/rules.d
393
394 cp packaging/99-bluetooth-rfkill.rules %{buildroot}/%{_prefix}/lib/udev/rules.d/99-bluetooth-rfkill.rules
395
396 # extension-emulator
397 %ifarch %{ix86} x86_64
398 cp build_emulator/libbluetooth-api.so*.emulator %{buildroot}%{_libdir}/
399 #mv %{buildroot}/%{_bindir}/bt-service-emul %{buildroot}/%{_bindir}/bt-service
400 %endif
401
402 # Rename the postfix (.mobile, .tv, ..) at post script
403 # mobile
404 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
405
406 # extension-TM1
407 %ifarch %{ix86} || %{arm}
408 cp tm1/bt-core.tm1 %{buildroot}%{_bindir}/
409 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tm1
410 %endif
411
412 # wearable / ivi
413 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
414 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
415 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
416 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
417
418 # tv
419 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
420
421 # common
422 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
423
424 # bt-core
425 install -m 0644 bt-core/bluetooth-frwk-core.service %{buildroot}%{_unitdir}/bluetooth-frwk-core.service
426
427 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
428 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
429
430 %postun -p /sbin/ldconfig
431
432 %post service
433 /usr/bin/chsmack -a '_' %{_varlibdir}/bluetooth/auto-pair-blacklist
434 /usr/bin/chown network_fw:network_fw %{_varlibdir}/bluetooth/auto-pair-blacklist
435
436 %files
437 %manifest %{name}.manifest
438 %license LICENSE
439 %defattr(-, root, root)
440 %{_libdir}/libbluetooth-api.so.*
441 %exclude %{_libdir}/libbluetooth-api.so*.emulator
442
443 %files devel
444 %defattr(-, root, root)
445 %{_includedir}/bt-service/bluetooth-api.h
446 %{_includedir}/bt-service/bluetooth-hid-api.h
447 %{_includedir}/bt-service/bluetooth-audio-api.h
448 %{_includedir}/bt-service/bluetooth-telephony-api.h
449 %{_includedir}/bt-service/bluetooth-media-control.h
450 %{_includedir}/bt-service/bluetooth-scmst-api.h
451 %{_includedir}/bt-service/bluetooth-ipsp-api.h
452 %{_includedir}/bt-service/bluetooth-gatt-server-api.h
453 %{_includedir}/bt-service/bluetooth-gatt-client-api.h
454 %{_includedir}/bt-service/bluetooth-mesh-api.h
455 %{_libdir}/pkgconfig/bluetooth-api.pc
456 %{_libdir}/libbluetooth-api.so
457
458 # extension-emulator
459 %ifarch %{ix86} x86_64
460 %post extension-emulator
461 pushd %{_libdir}
462 for FILE in libbluetooth-api.so*.emulator; do mv "${FILE}" "${FILE%.emulator}"; done
463 popd
464 %preun extension-emulator
465 pushd %{_libdir}
466 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
467 popd
468 %files extension-emulator
469 %manifest %{name}.manifest
470 %defattr(-, root, root)
471 %{_libdir}/libbluetooth-api.so.*.emulator
472 %{_libdir}/libbluetooth-api.so.emulator
473 %endif
474
475 %files service
476 %manifest %{name}.manifest
477 %license LICENSE
478 %defattr(-, root, root)
479 %{_bindir}/bt-service
480 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
481 %{_bindir}/bluetooth-frwk-test
482 %{_varlibdir}/bluetooth
483 %{_prefix}/etc/bluetooth
484 %attr(-,network_fw,network_fw) %{_varlibdir}/bluetooth/auto-pair-blacklist
485
486 %if %{bt_http_proxy} == ENABLED
487 %files httpproxy
488 %manifest %{name}.manifest
489 %license LICENSE
490 %defattr(-, root, root)
491 %{_bindir}/bt-httpproxy
492 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
493 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
494 %endif
495
496 %files otp
497 %manifest %{name}.manifest
498 %license LICENSE
499 %defattr(-, root, root)
500 %{_bindir}/bt-otp
501 %{_datadir}/dbus-1/system-services/org.projectx.otp.service
502 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-otp.conf
503
504 %files core
505 %manifest %{name}.manifest
506 %license LICENSE
507 %defattr(-, root, root)
508 %{_unitdir}/bluetooth-frwk-core.service
509 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
510 %{_bindir}/bt-core
511 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
512 %{_prefix}/lib/udev/rules.d/99-bluetooth-rfkill.rules
513
514 %files test
515 %manifest %{name}.manifest
516 %license LICENSE
517 %defattr(-, root, root)
518 %{_bindir}/bluetooth-frwk-test
519 #%{_bindir}/bluetooth-gatt-test
520 #%{_bindir}/bluetooth-advertising-test
521
522 %files plugin-headed
523 %manifest %{name}.manifest
524 %license LICENSE
525 %defattr(-, root, root)
526 %{_libdir}/bt-plugin-headed.so
527
528 %post profile_common
529 pushd %{_unitdir}
530 mv bluetooth-frwk.service.common bluetooth-frwk.service
531 popd
532 %preun profile_common
533 pushd %{_unitdir}
534 mv bluetooth-frwk.service bluetooth-frwk.service.common
535 popd
536 %files profile_common
537 %license LICENSE
538 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
539 %exclude %{_unitdir}/starter.target.wants/bluetooth-frwk.service
540 %{_unitdir}/bluetooth-frwk.service.common
541 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
542
543 %post profile_mobile
544 pushd %{_unitdir}
545 mv bluetooth-frwk.service.mobile bluetooth-frwk.service
546 popd
547 %preun profile_mobile
548 pushd %{_unitdir}
549 mv bluetooth-frwk.service bluetooth-frwk.service.mobile
550 popd
551 %files profile_mobile
552 %license LICENSE
553 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
554 %{_unitdir}/bluetooth-frwk.service.mobile
555 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
556
557 # extension-TM1
558 %ifarch %{ix86} || %{arm}
559 %post extension-TM1
560 pushd %{_unitdir}
561 mv bluetooth-frwk.service.tm1 bluetooth-frwk.service
562 popd
563 pushd %{_bindir}
564 mv bt-core.tm1 bt-core
565 popd
566 %preun extension-TM1
567 pushd %{_unitdir}
568 mv bluetooth-frwk.service bluetooth-frwk.service.tm1
569 popd
570 pushd %{_bindir}
571 mv bt-core bt-core.tm1
572 popd
573 %files extension-TM1
574 %{_unitdir}/bluetooth-frwk.service.tm1
575 %license LICENSE
576 %defattr(-, root, root)
577 %{_bindir}/bt-core.tm1
578 %endif
579
580 %post profile_wearable
581 pushd %{_unitdir}
582 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
583 popd
584 %preun profile_wearable
585 pushd %{_unitdir}
586 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
587 popd
588 %files profile_wearable
589 %license LICENSE
590 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
591 %{_unitdir}/bluetooth-frwk.service.wearable
592 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
593
594 %post profile_tv
595 pushd %{_unitdir}
596 mv bluetooth-frwk.service.tv bluetooth-frwk.service
597 popd
598 %preun profile_tv
599 pushd %{_unitdir}
600 mv bluetooth-frwk.service bluetooth-frwk.service.tv
601 popd
602 %files profile_tv
603 %license LICENSE
604 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
605 %{_unitdir}/bluetooth-frwk.service.tv
606 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
607
608 # Note: ivi reuses bluetooth-frwk.service.wearable
609 %post profile_ivi
610 pushd %{_unitdir}
611 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
612 popd
613 pushd %{_datadir}/dbus-1/system-services
614 mv org.projectx.bt.service.ivi org.projectx.bt.service
615 popd
616 %preun profile_ivi
617 pushd %{_unitdir}
618 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
619 popd
620 pushd %{_datadir}/dbus-1/system-services
621 mv org.projectx.bt.service org.projectx.bt.service.ivi
622 popd
623 %files profile_ivi
624 %license LICENSE
625 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
626 %{_unitdir}/bluetooth-frwk.service.wearable
627 %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
628
629 %files oal
630 %manifest %{name}.manifest
631 %defattr(-, root, root)
632 %{_libdir}/libbt-oal.so*
633 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-gap-agent.conf
634
635 %if %{bt_bluez_hal} == ENABLED
636 %{_libdir}/libbluetooth.default.so*
637 %endif
638
639 %files -n bluetooth-haltests
640 %manifest %{name}.manifest
641 %{_bindir}/bluetooth-haltests