707294eed62687d3d2cd1e71cd42330acfd330e9
[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
47 Requires(post): /usr/bin/vconftool
48 Requires(post): /sbin/ldconfig
49 Requires(postun): /sbin/ldconfig
50
51 %description
52 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
53  This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
54
55 %package profile_common
56 Summary:    bluetooth-frwk service and conf files for common profile
57 Requires:   %{name} = %{version}-%{release}
58 Conflicts:  %{name}-profile_mobile
59 Conflicts:  %{name}-profile_wearable
60 Conflicts:  %{name}-profile_tv
61 Conflicts:  %{name}-profile_ivi
62 %description profile_common
63 Bluetooth framework configuration and service files for Tizen common profile
64
65 %package profile_mobile
66 Summary:    bluetooth-frwk service and conf files for mobile profile
67 Requires:   %{name} = %{version}-%{release}
68 Conflicts:  %{name}-profile_common
69 Conflicts:  %{name}-profile_wearable
70 Conflicts:  %{name}-profile_tv
71 Conflicts:  %{name}-profile_ivi
72 %description profile_mobile
73 Bluetooth framework configuration and service files for Tizen mobile profile
74
75 # extension-TM1
76 %ifarch %{ix86} || %{arm}
77 %package extension-TM1
78 Summary:    bluetooth-frwk service and conf files for mobile TM1
79 Requires:   %{name}-profile_mobile = %{version}-%{release}
80 %description extension-TM1
81 Bluetooth framework configuration and service files for Tizen mobile TM1
82 %endif
83
84 %package profile_wearable
85 Summary:    bluetooth-frwk service and conf files for wearable profile
86 Requires:   %{name} = %{version}-%{release}
87 Conflicts:  %{name}-profile_mobile
88 Conflicts:  %{name}-profile_common
89 Conflicts:  %{name}-profile_tv
90 Conflicts:  %{name}-profile_ivi
91 %description profile_wearable
92 Bluetooth framework configuration and service files for Tizen wearable profile
93
94 %package profile_tv
95 Summary:    bluetooth-frwk service and conf files for tv profile
96 Requires:   %{name} = %{version}-%{release}
97 Conflicts:  %{name}-profile_mobile
98 Conflicts:  %{name}-profile_wearable
99 Conflicts:  %{name}-profile_common
100 Conflicts:  %{name}-profile_ivi
101 %description profile_tv
102 Bluetooth framework configuration and service files for Tizen tv profile
103
104 %package profile_ivi
105 Summary:    bluetooth-frwk service and conf files for ivi profile
106 Requires:   %{name} = %{version}-%{release}
107 Conflicts:  %{name}-profile_mobile
108 Conflicts:  %{name}-profile_wearable
109 Conflicts:  %{name}-profile_tv
110 Conflicts:  %{name}-profile_common
111 %description profile_ivi
112 Bluetooth framework configuration and service files for Tizen ivi profile
113
114 %ifarch %{ix86} x86_64
115 %package extension-emulator
116 Summary:    bluetooth-frwk service and conf files for emulator
117 Requires:   %{name} = %{version}-%{release}
118 %description extension-emulator
119 bluetooth-frwk service and conf files for emulator
120 %endif // ifarch %{ix86} x86_64
121
122 %package devel
123 Summary:    Bluetooth framework for BlueZ and Obexd
124 Group:      Development/Libraries
125 Requires:   %{name} = %{version}-%{release}
126
127 %description devel
128 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
129 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
130
131 %package service
132 Summary:    Bluetooth Service daemon
133 Group:      Network & Connectivity/Bluetooth
134 Requires:   %{name} = %{version}-%{release}
135
136 %description service
137 This package is Bluetooth Service daemon to manage BT services.
138
139 %package httpproxy
140 Summary:    Bluetooth HTTP Proxy Service daemon
141 Group:      Network & Connectivity/Bluetooth
142 Requires:   %{name} = %{version}-%{release}
143
144 %description httpproxy
145 This package is Bluetooth HTTP Proxy Service daemon
146
147 %package otp
148 Summary:    Bluetooth OTP Service daemon
149 Group:      Network & Connectivity/Bluetooth
150 Requires:   %{name} = %{version}-%{release}
151
152 %description otp
153 This package is Bluetooth OTP Service daemon
154
155 %package core
156 Summary:    Bluetooth Core daemon
157 Group:      Network & Connectivity/Bluetooth
158 Requires:   %{name} = %{version}-%{release}
159
160 %description core
161 This package is Bluetooth core daemon to manage activation / deactivation.
162
163 %package test
164 Summary:    Bluetooth test application
165 Group:      Network & Connectivity/Bluetooth
166 Requires:   %{name} = %{version}-%{release}
167
168 %description test
169 This package is Bluetooth test application.
170
171 %package oal
172 Summary:    Bluetooth OAL
173 Group:      Network & Connectivity/Bluetooth
174 Requires:   %{name} = %{version}-%{release}
175
176 %description oal
177 This package is BT stack common interface.
178
179 %package plugin-headed
180 Summary:    Bluetooth plugin Headed
181 Group:      Network & Connectivity/Bluetooth
182 Requires:   %{name} = %{version}-%{release}
183
184 %description plugin-headed
185 This package is Bluetooth plugin to manage UI and syspopup
186
187 %package -n bluetooth-haltests
188 Summary: HAL Test package for bluetooth OAL
189 Group:   TO_BE/FILLED
190 Requires: %{name} = %{version}-%{release}
191
192 %description -n bluetooth-haltests
193 This package is C-API test application.
194
195 %prep
196 %setup -q
197 cp %{SOURCE1001} .
198
199
200 %build
201 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
202 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_OBEX"
203 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_PAN_NAP"
204 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_IPSP"
205 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
206 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
207 export CFLAGS="$CFLAGS -DTIZEN_GATT_CLIENT"
208 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_ACTD"
209
210 %define _servicefile packaging/bluetooth-frwk-common.service
211 %define _servicedir starter.target.wants
212
213 %if "%{?profile}" == "mobile"
214 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_NETWORK_TETHERING_ENABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED -DTIZEN_PROFILE_MOBILE -DTIZEN_FEATURE_TELEPHONY_ENABLED"
215 %if "%{?tizen_target_name}" == "TM1"
216 %define _servicefile packaging/bluetooth-frwk-mobile-sprd.service
217 %else
218 %define _servicefile packaging/bluetooth-frwk-mobile.service
219 %endif
220 %define _servicedir multi-user.target.wants
221 %endif
222
223 %if "%{?profile}" == "wearable"
224 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_WEARABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED"
225 %define _servicefile packaging/bluetooth-frwk-wearable.service
226 %define _servicedir multi-user.target.wants
227 %endif
228
229 %if "%{?profile}" == "tv"
230 export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV -DAUTO_ACCEPT"
231 %define _servicefile packaging/bluetooth-frwk-tv.service
232 %define _servicedir multi-user.target.wants
233 %endif
234
235 %if "%{?profile}" == "ivi"
236 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI"
237 %define _servicefile packaging/bluetooth-frwk-wearable.service
238 %define _servicedir multi-user.target.wants
239 %endif
240
241 %ifarch x86_64
242 #export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
243 export CFLAGS="$CFLAGS -fpie"
244 export CFLAGS+=" -DARCH64"
245 export CXXFLAGS+=" -DARCH64"
246 export FFLAGS+=" -DARCH64"
247 %else
248 export CFLAGS="$CFLAGS -fpie"
249 export LDFLAGS="$CFLAGS -pie"
250 %endif
251
252 %if %{bt_bluez_hal} == ENABLED
253 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT -DTIZEN_BT_HAL"
254 %else
255 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
256 %endif
257 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
258
259 %if %{bt_gatt_client_fd} == DISABLED
260 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_GATT_CLIENT_FD_DISABLE"
261 %endif
262
263 %ifarch %{ix86} x86_64
264 export CFLAGS+=" -DTIZEN_TEST_EMUL"
265 export CXXFLAGS+=" -DTIZEN_TEST_EMUL"
266 export FFLAGS+=" -DTIZEN_TEST_EMUL"
267 %endif
268
269 %if %{bt_bluez_hal} == ENABLED
270 export BT_INCLUDE_OAL_BLUEZ=ENABLED
271 export CFLAGS="$CFLAGS -DTIZEN_BT_INCLUDE_OAL_BLUEZ"
272 %else
273 export BT_INCLUDE_OAL_BLUEZ=DISABLED
274 %endif
275
276 export CFLAGS_DEFAULT="$CFLAGS"
277 export CXXFLAGS_DEFAULT="$CXXFLAGS"
278 export FFLAGS_DEFAULT="$FFLAGS"
279
280 # extension-TM1
281 %ifarch %{ix86} || %{arm}
282 mkdir -p tm1
283 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
284 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
285 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
286
287 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
288 -DCMAKE_LIB_DIR=%{_libdir} \
289 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
290 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
291         -DLIBNOTIFY_SUPPORT=Off \
292         -DLIBNOTIFICATION_SUPPORT=Off
293 make %{?_smp_mflags}
294
295 %cmake
296
297 %make_install
298 cp %{buildroot}%{_bindir}/bt-core tm1/bt-core.tm1
299 %endif
300
301 # extension-emulator
302 %ifarch %{ix86} x86_64
303 export CFLAGS="${CFLAGS} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
304 export CXXFLAGS="${CXXFLAGS} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
305 export FFLAGS="${FFLAGS} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
306
307 mkdir -p build_emulator
308
309 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
310 -DCMAKE_LIB_DIR=%{_libdir} \
311 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
312 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
313         -DLIBNOTIFY_SUPPORT=Off \
314         -DLIBNOTIFICATION_SUPPORT=Off
315 make %{?_smp_mflags}
316
317 %cmake
318
319 %make_install
320 cp %{buildroot}%{_libdir}/libbluetooth-api.so* build_emulator/
321 pushd build_emulator/
322 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
323 popd
324 %endif
325
326 # non-extension-TM1 / non-extension-emulator
327
328 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
329 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
330 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
331
332 %ifarch aarch64
333 echo arch64
334 export CFLAGS+=" -DARCH64"
335 export CXXFLAGS+=" -DARCH64"
336 export FFLAGS+=" -DARCH64"
337 %endif
338
339 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
340 -DCMAKE_LIB_DIR=%{_libdir} \
341 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
342 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
343         -DLIBNOTIFY_SUPPORT=Off \
344         -DLIBNOTIFICATION_SUPPORT=Off
345 make %{?_smp_mflags}
346
347 %cmake
348
349 %install
350 rm -rf %{buildroot}
351 %make_install
352
353 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
354 mkdir -p %{buildroot}%{_unitdir}/delayed.target.wants
355 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
356 mkdir -p %{buildroot}/%{_prefix}/lib/udev/rules.d
357
358 cp packaging/99-bluetooth-rfkill.rules %{buildroot}/%{_prefix}/lib/udev/rules.d/99-bluetooth-rfkill.rules
359
360 # extension-emulator
361 %ifarch %{ix86} x86_64
362 cp build_emulator/libbluetooth-api.so*.emulator %{buildroot}%{_libdir}/
363 #mv %{buildroot}/%{_bindir}/bt-service-emul %{buildroot}/%{_bindir}/bt-service
364 %endif
365
366 # Rename the postfix (.mobile, .tv, ..) at post script
367 # mobile
368 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
369
370 # extension-TM1
371 %ifarch %{ix86} || %{arm}
372 cp tm1/bt-core.tm1 %{buildroot}%{_bindir}/
373 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tm1
374 %endif
375
376 # wearable / ivi
377 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
378 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
379 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
380 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
381
382 # tv
383 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
384
385 # common
386 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
387
388 # bt-core
389 install -m 0644 bt-core/bluetooth-frwk-core.service %{buildroot}%{_unitdir}/bluetooth-frwk-core.service
390
391 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
392 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
393
394 %post core
395 mkdir -p %{_libdir}/systemd/system/delayed.target.wants
396 ln -sf %{_libdir}/systemd/system/bluetooth-frwk-core.service %{_libdir}/systemd/system/delayed.target.wants/bluetooth-frwk-core.service
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