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