Move haltest package to hal-api-bluetooth
[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_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(libactd)
57 BuildRequires:  pkgconfig(libsystemd)
58 BuildRequires:  pkgconfig(hal-api-bluetooth)
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, BT RFCOMM and BLE Mesh.
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 %prep
203 %setup -q
204 cp %{SOURCE1001} .
205
206
207 %build
208 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
209 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_OBEX"
210 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_PAN_NAP"
211 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_IPSP"
212 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
213 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
214
215 %define _servicefile packaging/bluetooth-frwk-common.service
216 %define _servicedir starter.target.wants
217
218 %if "%{?profile}" == "mobile"
219 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_NETWORK_TETHERING_ENABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED -DTIZEN_PROFILE_MOBILE -DTIZEN_FEATURE_TELEPHONY_ENABLED"
220 %if "%{?tizen_target_name}" == "TM1"
221 %define _servicefile packaging/bluetooth-frwk-mobile-sprd.service
222 %else
223 %define _servicefile packaging/bluetooth-frwk-mobile.service
224 %endif
225 %define _servicedir multi-user.target.wants
226 %endif
227
228 %if "%{?profile}" == "wearable"
229 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_WEARABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED"
230 %define _servicefile packaging/bluetooth-frwk-wearable.service
231 %define _servicedir multi-user.target.wants
232 %endif
233
234 %if "%{?profile}" == "tv"
235 export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV -DAUTO_ACCEPT"
236 %define _servicefile packaging/bluetooth-frwk-tv.service
237 %define _servicedir multi-user.target.wants
238 %endif
239
240 %if "%{?profile}" == "ivi"
241 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI"
242 %define _servicefile packaging/bluetooth-frwk-wearable.service
243 %define _servicedir multi-user.target.wants
244 %endif
245
246 %ifarch x86_64
247 #export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
248 export CFLAGS="$CFLAGS -fpie"
249 export CFLAGS+=" -DARCH64"
250 export CXXFLAGS+=" -DARCH64"
251 export FFLAGS+=" -DARCH64"
252 %else
253 export CFLAGS="$CFLAGS -fpie"
254 export LDFLAGS="$CFLAGS -pie"
255 %endif
256
257 %if %{bt_bluez_hal} == ENABLED
258 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT -DTIZEN_BT_HAL"
259 %else
260 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
261 %endif
262 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
263
264 %if %{bt_gatt_client_fd} == DISABLED
265 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_GATT_CLIENT_FD_DISABLE"
266 %endif
267
268 %if %{bt_permanent_log} == ENABLED
269 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_PERMANENT_LOG"
270 %endif
271
272 %if %{bt_http_proxy} == ENABLED
273 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_HTTP_PROXY"
274 %endif
275
276 %if %{bt_factory_mode} == ENABLED
277 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_FACTORY_MODE"
278 %endif
279
280 %if %{bt_vendor_operation} == ENABLED
281 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_VENDOR_OPERATION"
282 %endif
283
284 %if %{bt_bluez_hal} == ENABLED
285 export BT_INCLUDE_OAL_BLUEZ=ENABLED
286 export CFLAGS="$CFLAGS -DTIZEN_BT_INCLUDE_OAL_BLUEZ"
287 %else
288 export BT_INCLUDE_OAL_BLUEZ=DISABLED
289 %endif
290
291 export CFLAGS_DEFAULT="$CFLAGS"
292 export CXXFLAGS_DEFAULT="$CXXFLAGS"
293 export FFLAGS_DEFAULT="$FFLAGS"
294
295 # extension-TM1
296 %ifarch %{ix86} || %{arm}
297 mkdir -p tm1
298 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
299 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
300 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
301
302 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
303 -DCMAKE_LIB_DIR=%{_libdir} \
304 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
305 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
306         -DLIBNOTIFY_SUPPORT=Off \
307         -DLIBNOTIFICATION_SUPPORT=Off
308 make %{?_smp_mflags}
309
310 %cmake
311
312 %make_install
313 cp %{buildroot}%{_bindir}/bt-core tm1/bt-core.tm1
314 %endif
315
316 # extension-emulator
317 %ifarch %{ix86} x86_64
318 export CFLAGS="${CFLAGS} -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
319 export CXXFLAGS="${CXXFLAGS} -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
320 export FFLAGS="${FFLAGS} -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
321
322 mkdir -p build_emulator
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}%{_libdir}/libbluetooth-api.so* build_emulator/
336 pushd build_emulator/
337 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
338 popd
339 %endif
340
341 # non-extension-TM1 / non-extension-emulator
342
343 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
344 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
345 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
346
347 %ifarch aarch64
348 echo arch64
349 export CFLAGS+=" -DARCH64"
350 export CXXFLAGS+=" -DARCH64"
351 export FFLAGS+=" -DARCH64"
352 %endif
353
354 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
355 -DCMAKE_LIB_DIR=%{_libdir} \
356 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
357 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
358         -DLIBNOTIFY_SUPPORT=Off \
359         -DLIBNOTIFICATION_SUPPORT=Off
360 make %{?_smp_mflags}
361
362 %cmake
363
364 %install
365 rm -rf %{buildroot}
366 %make_install
367
368 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
369 mkdir -p %{buildroot}%{_unitdir}/delayed.target.wants
370 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
371 mkdir -p %{buildroot}/%{_prefix}/lib/udev/rules.d
372 mkdir -p %{buildroot}%{_meshdir}
373
374 cp packaging/99-bluetooth-rfkill.rules %{buildroot}/%{_prefix}/lib/udev/rules.d/99-bluetooth-rfkill.rules
375
376 # extension-emulator
377 %ifarch %{ix86} x86_64
378 cp build_emulator/libbluetooth-api.so*.emulator %{buildroot}%{_libdir}/
379 #mv %{buildroot}/%{_bindir}/bt-service-emul %{buildroot}/%{_bindir}/bt-service
380 %endif
381
382 # Rename the postfix (.mobile, .tv, ..) at post script
383 # mobile
384 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
385
386 # extension-TM1
387 %ifarch %{ix86} || %{arm}
388 cp tm1/bt-core.tm1 %{buildroot}%{_bindir}/
389 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tm1
390 %endif
391
392 # wearable / ivi
393 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
394 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
395 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
396 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
397
398 # tv
399 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
400
401 # common
402 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
403
404 # bt-core
405 install -m 0644 bt-core/bluetooth-frwk-core.service %{buildroot}%{_unitdir}/bluetooth-frwk-core.service
406
407 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
408 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
409
410 %postun -p /sbin/ldconfig
411
412 %post service
413 /usr/bin/chsmack -a '_' %{_varlibdir}/bluetooth/auto-pair-blacklist
414 /usr/bin/chown network_fw:network_fw %{_varlibdir}/bluetooth/auto-pair-blacklist
415 /usr/bin/chown network_fw:network_fw %{_meshdir}
416
417 %files
418 %manifest %{name}.manifest
419 %license LICENSE
420 %defattr(-, root, root)
421 %{_libdir}/libbluetooth-api.so.*
422 %exclude %{_libdir}/libbluetooth-api.so*.emulator
423
424 %files devel
425 %defattr(-, root, root)
426 %{_includedir}/bt-service/bluetooth-api.h
427 %{_includedir}/bt-service/bluetooth-hid-api.h
428 %{_includedir}/bt-service/bluetooth-audio-api.h
429 %{_includedir}/bt-service/bluetooth-telephony-api.h
430 %{_includedir}/bt-service/bluetooth-media-control.h
431 %{_includedir}/bt-service/bluetooth-scmst-api.h
432 %{_includedir}/bt-service/bluetooth-ipsp-api.h
433 %{_includedir}/bt-service/bluetooth-gatt-server-api.h
434 %{_includedir}/bt-service/bluetooth-gatt-client-api.h
435 %{_includedir}/bt-service/bluetooth-mesh-api.h
436 %{_libdir}/pkgconfig/bluetooth-api.pc
437 %{_libdir}/libbluetooth-api.so
438
439 # extension-emulator
440 %ifarch %{ix86} x86_64
441 %post extension-emulator
442 pushd %{_libdir}
443 for FILE in libbluetooth-api.so*.emulator; do mv "${FILE}" "${FILE%.emulator}"; done
444 popd
445 %preun extension-emulator
446 pushd %{_libdir}
447 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
448 popd
449 %files extension-emulator
450 %manifest %{name}.manifest
451 %defattr(-, root, root)
452 %{_libdir}/libbluetooth-api.so.*.emulator
453 %{_libdir}/libbluetooth-api.so.emulator
454 %endif
455
456 %files service
457 %manifest %{name}.manifest
458 %license LICENSE
459 %defattr(-, root, root)
460 %{_bindir}/bt-service
461 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
462 %{_bindir}/bluetooth-frwk-test
463 %{_varlibdir}/bluetooth
464 %{_prefix}/etc/bluetooth
465 %{_meshdir}
466 %attr(-,network_fw,network_fw) %{_varlibdir}/bluetooth/auto-pair-blacklist
467
468 %if %{bt_http_proxy} == ENABLED
469 %files httpproxy
470 %manifest %{name}.manifest
471 %license LICENSE
472 %defattr(-, root, root)
473 %{_bindir}/bt-httpproxy
474 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
475 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
476 %endif
477
478 %files otp
479 %manifest %{name}.manifest
480 %license LICENSE
481 %defattr(-, root, root)
482 %{_bindir}/bt-otp
483 %{_datadir}/dbus-1/system-services/org.projectx.otp.service
484 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-otp.conf
485
486 %files core
487 %manifest %{name}.manifest
488 %license LICENSE
489 %defattr(-, root, root)
490 %{_unitdir}/bluetooth-frwk-core.service
491 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
492 %{_bindir}/bt-core
493 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
494 %{_prefix}/lib/udev/rules.d/99-bluetooth-rfkill.rules
495
496 %files test
497 %manifest %{name}.manifest
498 %license LICENSE
499 %defattr(-, root, root)
500 %{_bindir}/bluetooth-frwk-test
501 #%{_bindir}/bluetooth-gatt-test
502 #%{_bindir}/bluetooth-advertising-test
503
504 %files plugin-headed
505 %manifest %{name}.manifest
506 %license LICENSE
507 %defattr(-, root, root)
508 %{_libdir}/bt-plugin-headed.so
509
510 %post profile_common
511 pushd %{_unitdir}
512 mv bluetooth-frwk.service.common bluetooth-frwk.service
513 popd
514 %preun profile_common
515 pushd %{_unitdir}
516 mv bluetooth-frwk.service bluetooth-frwk.service.common
517 popd
518 %files profile_common
519 %license LICENSE
520 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
521 %exclude %{_unitdir}/starter.target.wants/bluetooth-frwk.service
522 %{_unitdir}/bluetooth-frwk.service.common
523 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
524
525 %post profile_mobile
526 pushd %{_unitdir}
527 mv bluetooth-frwk.service.mobile bluetooth-frwk.service
528 popd
529 %preun profile_mobile
530 pushd %{_unitdir}
531 mv bluetooth-frwk.service bluetooth-frwk.service.mobile
532 popd
533 %files profile_mobile
534 %license LICENSE
535 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
536 %{_unitdir}/bluetooth-frwk.service.mobile
537 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
538
539 # extension-TM1
540 %ifarch %{ix86} || %{arm}
541 %post extension-TM1
542 pushd %{_unitdir}
543 mv bluetooth-frwk.service.tm1 bluetooth-frwk.service
544 popd
545 pushd %{_bindir}
546 mv bt-core.tm1 bt-core
547 popd
548 %preun extension-TM1
549 pushd %{_unitdir}
550 mv bluetooth-frwk.service bluetooth-frwk.service.tm1
551 popd
552 pushd %{_bindir}
553 mv bt-core bt-core.tm1
554 popd
555 %files extension-TM1
556 %{_unitdir}/bluetooth-frwk.service.tm1
557 %license LICENSE
558 %defattr(-, root, root)
559 %{_bindir}/bt-core.tm1
560 %endif
561
562 %post profile_wearable
563 pushd %{_unitdir}
564 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
565 popd
566 %preun profile_wearable
567 pushd %{_unitdir}
568 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
569 popd
570 %files profile_wearable
571 %license LICENSE
572 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
573 %{_unitdir}/bluetooth-frwk.service.wearable
574 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
575
576 %post profile_tv
577 pushd %{_unitdir}
578 mv bluetooth-frwk.service.tv bluetooth-frwk.service
579 popd
580 %preun profile_tv
581 pushd %{_unitdir}
582 mv bluetooth-frwk.service bluetooth-frwk.service.tv
583 popd
584 %files profile_tv
585 %license LICENSE
586 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
587 %{_unitdir}/bluetooth-frwk.service.tv
588 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
589
590 # Note: ivi reuses bluetooth-frwk.service.wearable
591 %post profile_ivi
592 pushd %{_unitdir}
593 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
594 popd
595 pushd %{_datadir}/dbus-1/system-services
596 mv org.projectx.bt.service.ivi org.projectx.bt.service
597 popd
598 %preun profile_ivi
599 pushd %{_unitdir}
600 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
601 popd
602 pushd %{_datadir}/dbus-1/system-services
603 mv org.projectx.bt.service org.projectx.bt.service.ivi
604 popd
605 %files profile_ivi
606 %license LICENSE
607 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
608 %{_unitdir}/bluetooth-frwk.service.wearable
609 %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
610
611 %files oal
612 %manifest %{name}.manifest
613 %defattr(-, root, root)
614 %{_libdir}/libbt-oal.so*
615 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-gap-agent.conf
616
617 %if %{bt_bluez_hal} == ENABLED
618 %{_libdir}/libbluetooth.default.so*
619 %endif