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