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