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