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