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