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)$
6 %define _dumpdir /opt/etc/dump.d/module.d
7 %define _varlibdir /opt/var/lib
10 Summary: Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
13 Group: Network & Connectivity/Bluetooth
15 Source0: %{name}-%{version}.tar.gz
16 Source1001: bluetooth-frwk.manifest
18 %if "%{?profile}" != "mobile"
19 Requires: bluetooth-tools
21 BuildRequires: pkgconfig(aul)
22 BuildRequires: pkgconfig(dlog)
23 BuildRequires: pkgconfig(glib-2.0)
24 BuildRequires: pkgconfig(gio-2.0)
25 BuildRequires: pkgconfig(gio-unix-2.0)
26 BuildRequires: pkgconfig(syspopup-caller)
27 BuildRequires: pkgconfig(vconf)
28 BuildRequires: pkgconfig(libxml-2.0)
29 BuildRequires: pkgconfig(capi-network-connection)
30 BuildRequires: pkgconfig(alarm-service)
31 BuildRequires: pkgconfig(capi-content-mime-type)
32 BuildRequires: pkgconfig(appcore-efl)
33 BuildRequires: pkgconfig(pkgmgr)
34 #BuildRequires: pkgconfig(journal)
35 BuildRequires: pkgconfig(eventsystem)
36 BuildRequires: pkgconfig(libsoup-2.4)
37 BuildRequires: pkgconfig(capi-network-tethering)
39 BuildRequires: pkgconfig(cynara-client)
40 BuildRequires: pkgconfig(cynara-creds-gdbus)
41 BuildRequires: pkgconfig(libtzplatform-config)
42 BuildRequires: pkgconfig(storage)
43 BuildRequires: pkgconfig(capi-system-info)
45 Requires(post): /usr/bin/vconftool
46 Requires(post): /sbin/ldconfig
47 Requires(postun): /sbin/ldconfig
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.
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
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
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
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
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
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
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
122 Summary: Bluetooth framework for BlueZ and Obexd
123 Group: Development/Libraries
124 Requires: %{name} = %{version}-%{release}
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.
131 Summary: Bluetooth Service daemon
132 Group: Network & Connectivity/Bluetooth
133 Requires: %{name} = %{version}-%{release}
136 This package is Bluetooth Service daemon to manage BT services.
139 Summary: Bluetooth HTTP Proxy Service daemon
141 Requires: %{name} = %{version}-%{release}
143 %description httpproxy
144 This package is Bluetooth HTTP Proxy Service daemon
147 Summary: Bluetooth OTP Service daemon
148 Group: Network & Connectivity/Bluetooth
149 Requires: %{name} = %{version}-%{release}
152 This package is Bluetooth OTP Service daemon
155 Summary: Bluetooth Core daemon
156 Group: Network & Connectivity/Bluetooth
157 Requires: %{name} = %{version}-%{release}
160 This package is Bluetooth core daemon to manage activation / deactivation.
163 Summary: Bluetooth test application
164 Group: Network & Connectivity/Bluetooth
165 Requires: %{name} = %{version}-%{release}
168 This package is Bluetooth test application.
170 %package plugin-headed
171 Summary: Bluetooth plugin Headed
172 Group: Network & Connectivity/Bluetooth
173 Requires: %{name} = %{version}-%{release}
175 %description plugin-headed
176 This package is Bluetooth plugin to manage UI and syspopup
184 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
185 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
186 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
189 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
190 export CFLAGS+=" -DARCH64"
191 export CXXFLAGS+=" -DARCH64"
192 export FFLAGS+=" -DARCH64"
194 export CFLAGS="$CFLAGS -fpie"
195 export LDFLAGS="$CFLAGS -pie"
198 %ifarch %{ix86} x86_64
199 export CFLAGS+=" -DTIZEN_TEST_EMUL"
200 export CXXFLAGS+=" -DTIZEN_TEST_EMUL"
201 export FFLAGS+=" -DTIZEN_TEST_EMUL"
204 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
205 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
209 export CFLAGS+=" -DARCH64"
210 export CXXFLAGS+=" -DARCH64"
211 export FFLAGS+=" -DARCH64"
214 export CFLAGS_DEFAULT="$CFLAGS"
215 export CXXFLAGS_DEFAULT="$CXXFLAGS"
216 export FFLAGS_DEFAULT="$FFLAGS"
219 %ifarch %{ix86} || %{arm}
221 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
222 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
223 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
225 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
226 -DCMAKE_LIB_DIR=%{_libdir} \
227 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
228 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
229 -DLIBNOTIFY_SUPPORT=Off \
230 -DLIBNOTIFICATION_SUPPORT=Off
236 cp %{buildroot}%{_bindir}/bt-core tm1/bt-core.tm1
240 %ifarch %{ix86} x86_64
241 export CFLAGS="${CFLAGS_BASE} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
242 export CXXFLAGS="${CXXFLAGS_BASE} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
243 export FFLAGS="${FFLAGS_BASE} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
245 mkdir -p build_emulator
247 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
248 -DCMAKE_LIB_DIR=%{_libdir} \
249 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
250 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
251 -DLIBNOTIFY_SUPPORT=Off \
252 -DLIBNOTIFICATION_SUPPORT=Off
258 cp %{buildroot}%{_libdir}/libbluetooth-api.so* build_emulator/
259 pushd build_emulator/
260 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
264 # non-extension-TM1 / non-extension-emulator
266 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
267 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
268 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
270 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
271 -DCMAKE_LIB_DIR=%{_libdir} \
272 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
273 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
274 -DLIBNOTIFY_SUPPORT=Off \
275 -DLIBNOTIFICATION_SUPPORT=Off
284 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
285 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
288 %ifarch %{ix86} x86_64
289 cp build_emulator/libbluetooth-api.so*.emulator %{buildroot}%{_libdir}/
290 mv %{buildroot}/%{_bindir}/bt-service-emul %{buildroot}/%{_bindir}/bt-service
293 # Rename the postfix (.mobile, .tv, ..) at post script
295 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
298 %ifarch %{ix86} || %{arm}
299 cp tm1/bt-core.tm1 %{buildroot}%{_bindir}/
300 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tm1
304 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
305 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
306 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
307 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
310 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
313 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
315 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
316 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
318 %postun -p /sbin/ldconfig
321 %manifest %{name}.manifest
323 %defattr(-, root, root)
324 %{_libdir}/libbluetooth-api.so.*
325 %exclude %{_libdir}/libbluetooth-api.so*.emulator
328 %defattr(-, root, root)
329 %{_includedir}/bt-service/bluetooth-api.h
330 %{_includedir}/bt-service/bluetooth-hid-api.h
331 %{_includedir}/bt-service/bluetooth-audio-api.h
332 %{_includedir}/bt-service/bluetooth-telephony-api.h
333 %{_includedir}/bt-service/bluetooth-media-control.h
334 %{_includedir}/bt-service/bluetooth-scmst-api.h
335 %{_includedir}/bt-service/bluetooth-ipsp-api.h
336 %{_libdir}/pkgconfig/bluetooth-api.pc
337 %{_libdir}/libbluetooth-api.so
340 %ifarch %{ix86} x86_64
341 %post extension-emulator
343 for FILE in libbluetooth-api.so*.emulator; do mv "${FILE}" "${FILE%.emulator}"; done
345 %preun extension-emulator
347 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
349 %files extension-emulator
350 %manifest %{name}.manifest
351 %defattr(-, root, root)
352 %{_libdir}/libbluetooth-api.so.*.emulator
353 %{_libdir}/libbluetooth-api.so.emulator
357 %manifest %{name}.manifest
359 %defattr(-, root, root)
360 %{_bindir}/bt-service
361 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
362 %{_bindir}/bluetooth-frwk-test
363 %{_varlibdir}/bluetooth
364 %{_prefix}/etc/bluetooth
367 %manifest %{name}.manifest
369 %defattr(-, root, root)
370 %{_bindir}/bt-httpproxy
371 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
372 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
376 %manifest %{name}.manifest
378 %defattr(-, root, root)
380 %{_datadir}/dbus-1/system-services/org.projectx.otp.service
381 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-otp.conf
384 %manifest %{name}.manifest
386 %defattr(-, root, root)
387 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
389 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
392 %manifest %{name}.manifest
394 %defattr(-, root, root)
395 %{_bindir}/bluetooth-frwk-test
396 #{_bindir}/bluetooth-gatt-test
397 #{_bindir}/bluetooth-advertising-test
400 %manifest %{name}.manifest
402 %defattr(-, root, root)
403 %{_libdir}/bt-plugin-headed.so
407 mv bluetooth-frwk.service.common bluetooth-frwk.service
409 %preun profile_common
411 mv bluetooth-frwk.service bluetooth-frwk.service.common
413 %files profile_common
415 %{_unitdir}/starter.target.wants/bluetooth-frwk.service
416 %{_unitdir}/bluetooth-frwk.service.common
417 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
421 mv bluetooth-frwk.service.mobile bluetooth-frwk.service
423 %preun profile_mobile
425 mv bluetooth-frwk.service bluetooth-frwk.service.mobile
427 %files profile_mobile
429 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
430 %{_unitdir}/bluetooth-frwk.service.mobile
431 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
434 %ifarch %{ix86} || %{arm}
437 mv bluetooth-frwk.service.tm1 bluetooth-frwk.service
440 mv bt-core.tm1 bt-core
444 mv bluetooth-frwk.service bluetooth-frwk.service.tm1
447 mv bt-core bt-core.tm1
450 %{_unitdir}/bluetooth-frwk.service.tm1
452 %defattr(-, root, root)
453 %{_bindir}/bt-core.tm1
456 %post profile_wearable
458 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
460 %preun profile_wearable
462 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
464 %files profile_wearable
466 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
467 %{_unitdir}/bluetooth-frwk.service.wearable
468 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
472 mv bluetooth-frwk.service.tv bluetooth-frwk.service
476 mv bluetooth-frwk.service bluetooth-frwk.service.tv
480 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
481 %{_unitdir}/bluetooth-frwk.service.tv
482 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
484 # Note: ivi reuses bluetooth-frwk.service.wearable
487 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
489 pushd %{_datadir}/dbus-1/system-services
490 mv org.projectx.bt.service.ivi org.projectx.bt.service
494 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
496 pushd %{_datadir}/dbus-1/system-services
497 mv org.projectx.bt.service org.projectx.bt.service.ivi
501 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
502 %{_unitdir}/bluetooth-frwk.service.wearable
503 %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
505 ### added /usr/etc/bluetooth/wearable/stack_info (others: /usr/etc/bluetooth/stack_info))
506 # (for PROFILE WEARABLE)