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