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