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 Core daemon
148 Group: Network & Connectivity/Bluetooth
149 Requires: %{name} = %{version}-%{release}
152 This package is Bluetooth core daemon to manage activation / deactivation.
155 Summary: Bluetooth test application
156 Group: Network & Connectivity/Bluetooth
157 Requires: %{name} = %{version}-%{release}
160 This package is Bluetooth test application.
162 %package plugin-headed
163 Summary: Bluetooth plugin Headed
164 Group: Network & Connectivity/Bluetooth
165 Requires: %{name} = %{version}-%{release}
167 %description plugin-headed
168 This package is Bluetooth plugin to manage UI and syspopup
176 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
177 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
178 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
181 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
182 export CFLAGS+=" -DARCH64"
183 export CXXFLAGS+=" -DARCH64"
184 export FFLAGS+=" -DARCH64"
186 export CFLAGS="$CFLAGS -fpie"
187 export LDFLAGS="$CFLAGS -pie"
190 %ifarch %{ix86} x86_64
191 export CFLAGS+=" -DTIZEN_TEST_EMUL"
192 export CXXFLAGS+=" -DTIZEN_TEST_EMUL"
193 export FFLAGS+=" -DTIZEN_TEST_EMUL"
196 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
197 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
201 export CFLAGS+=" -DARCH64"
202 export CXXFLAGS+=" -DARCH64"
203 export FFLAGS+=" -DARCH64"
206 export CFLAGS_DEFAULT="$CFLAGS"
207 export CXXFLAGS_DEFAULT="$CXXFLAGS"
208 export FFLAGS_DEFAULT="$FFLAGS"
211 %ifarch %{ix86} || %{arm}
213 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
214 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
215 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
217 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
218 -DCMAKE_LIB_DIR=%{_libdir} \
219 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
220 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
221 -DLIBNOTIFY_SUPPORT=Off \
222 -DLIBNOTIFICATION_SUPPORT=Off
228 cp %{buildroot}%{_bindir}/bt-core tm1/bt-core.tm1
232 %ifarch %{ix86} x86_64
233 export CFLAGS="${CFLAGS_BASE} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
234 export CXXFLAGS="${CXXFLAGS_BASE} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
235 export FFLAGS="${FFLAGS_BASE} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
237 mkdir -p build_emulator
239 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
240 -DCMAKE_LIB_DIR=%{_libdir} \
241 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
242 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
243 -DLIBNOTIFY_SUPPORT=Off \
244 -DLIBNOTIFICATION_SUPPORT=Off
250 cp %{buildroot}%{_libdir}/libbluetooth-api.so* build_emulator/
251 pushd build_emulator/
252 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
256 # non-extension-TM1 / non-extension-emulator
258 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
259 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
260 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
262 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
263 -DCMAKE_LIB_DIR=%{_libdir} \
264 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
265 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
266 -DLIBNOTIFY_SUPPORT=Off \
267 -DLIBNOTIFICATION_SUPPORT=Off
276 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
277 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
280 %ifarch %{ix86} x86_64
281 cp build_emulator/libbluetooth-api.so*.emulator %{buildroot}%{_libdir}/
282 mv %{buildroot}/%{_bindir}/bt-service-emul %{buildroot}/%{_bindir}/bt-service
285 # Rename the postfix (.mobile, .tv, ..) at post script
287 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
290 %ifarch %{ix86} || %{arm}
291 cp tm1/bt-core.tm1 %{buildroot}%{_bindir}/
292 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tm1
296 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
297 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
298 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
299 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
302 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
305 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
307 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
308 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
310 %postun -p /sbin/ldconfig
313 %manifest %{name}.manifest
315 %defattr(-, root, root)
316 %{_libdir}/libbluetooth-api.so.*
317 %exclude %{_libdir}/libbluetooth-api.so*.emulator
320 %defattr(-, root, root)
321 %{_includedir}/bt-service/bluetooth-api.h
322 %{_includedir}/bt-service/bluetooth-hid-api.h
323 %{_includedir}/bt-service/bluetooth-audio-api.h
324 %{_includedir}/bt-service/bluetooth-telephony-api.h
325 %{_includedir}/bt-service/bluetooth-media-control.h
326 %{_includedir}/bt-service/bluetooth-scmst-api.h
327 %{_includedir}/bt-service/bluetooth-ipsp-api.h
328 %{_libdir}/pkgconfig/bluetooth-api.pc
329 %{_libdir}/libbluetooth-api.so
332 %ifarch %{ix86} x86_64
333 %post extension-emulator
335 for FILE in libbluetooth-api.so*.emulator; do mv "${FILE}" "${FILE%.emulator}"; done
337 %preun extension-emulator
339 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
341 %files extension-emulator
342 %manifest %{name}.manifest
343 %defattr(-, root, root)
344 %{_libdir}/libbluetooth-api.so.*.emulator
345 %{_libdir}/libbluetooth-api.so.emulator
349 %manifest %{name}.manifest
351 %defattr(-, root, root)
352 %{_bindir}/bt-service
353 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
354 %{_bindir}/bluetooth-frwk-test
355 %{_varlibdir}/bluetooth
356 %{_prefix}/etc/bluetooth
359 %manifest %{name}.manifest
361 %defattr(-, root, root)
362 %{_bindir}/bt-httpproxy
363 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
364 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
367 %manifest %{name}.manifest
369 %defattr(-, root, root)
370 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
372 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
375 %manifest %{name}.manifest
377 %defattr(-, root, root)
378 %{_bindir}/bluetooth-frwk-test
379 #{_bindir}/bluetooth-gatt-test
380 #{_bindir}/bluetooth-advertising-test
383 %manifest %{name}.manifest
385 %defattr(-, root, root)
386 %{_libdir}/bt-plugin-headed.so
390 mv bluetooth-frwk.service.common bluetooth-frwk.service
392 %preun profile_common
394 mv bluetooth-frwk.service bluetooth-frwk.service.common
396 %files profile_common
398 %{_unitdir}/starter.target.wants/bluetooth-frwk.service
399 %{_unitdir}/bluetooth-frwk.service.common
400 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
404 mv bluetooth-frwk.service.mobile bluetooth-frwk.service
406 %preun profile_mobile
408 mv bluetooth-frwk.service bluetooth-frwk.service.mobile
410 %files profile_mobile
412 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
413 %{_unitdir}/bluetooth-frwk.service.mobile
414 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
417 %ifarch %{ix86} || %{arm}
420 mv bluetooth-frwk.service.tm1 bluetooth-frwk.service
423 mv bt-core.tm1 bt-core
427 mv bluetooth-frwk.service bluetooth-frwk.service.tm1
430 mv bt-core bt-core.tm1
433 %{_unitdir}/bluetooth-frwk.service.tm1
435 %defattr(-, root, root)
436 %{_bindir}/bt-core.tm1
439 %post profile_wearable
441 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
443 %preun profile_wearable
445 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
447 %files profile_wearable
449 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
450 %{_unitdir}/bluetooth-frwk.service.wearable
451 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
455 mv bluetooth-frwk.service.tv bluetooth-frwk.service
459 mv bluetooth-frwk.service bluetooth-frwk.service.tv
463 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
464 %{_unitdir}/bluetooth-frwk.service.tv
465 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
467 # Note: ivi reuses bluetooth-frwk.service.wearable
470 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
472 pushd %{_datadir}/dbus-1/system-services
473 mv org.projectx.bt.service.ivi org.projectx.bt.service
477 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
479 pushd %{_datadir}/dbus-1/system-services
480 mv org.projectx.bt.service org.projectx.bt.service.ivi
484 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
485 %{_unitdir}/bluetooth-frwk.service.wearable
486 %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
488 ### added /usr/etc/bluetooth/wearable/stack_info (others: /usr/etc/bluetooth/stack_info))
489 # (for PROFILE WEARABLE)