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(pkgmgr)
33 #BuildRequires: pkgconfig(journal)
34 BuildRequires: pkgconfig(eventsystem)
35 BuildRequires: pkgconfig(libsoup-2.4)
36 BuildRequires: pkgconfig(capi-network-tethering)
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)
44 Requires(post): /usr/bin/vconftool
45 Requires(post): /sbin/ldconfig
46 Requires(postun): /sbin/ldconfig
49 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
50 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
52 %package profile_common
53 Summary: bluetooth-frwk service and conf files for common profile
54 Requires: %{name} = %{version}-%{release}
55 Conflicts: %{name}-profile_mobile
56 Conflicts: %{name}-profile_wearable
57 Conflicts: %{name}-profile_tv
58 Conflicts: %{name}-profile_ivi
59 %description profile_common
60 Bluetooth framework configuration and service files for Tizen common profile
62 %package profile_mobile
63 Summary: bluetooth-frwk service and conf files for mobile profile
64 Requires: %{name} = %{version}-%{release}
65 Conflicts: %{name}-profile_common
66 Conflicts: %{name}-profile_wearable
67 Conflicts: %{name}-profile_tv
68 Conflicts: %{name}-profile_ivi
69 %description profile_mobile
70 Bluetooth framework configuration and service files for Tizen mobile profile
73 %ifarch %{ix86} || %{arm}
74 %package extension-TM1
75 Summary: bluetooth-frwk service and conf files for mobile TM1
76 Requires: %{name}-profile_mobile = %{version}-%{release}
77 %description extension-TM1
78 Bluetooth framework configuration and service files for Tizen mobile TM1
81 %package profile_wearable
82 Summary: bluetooth-frwk service and conf files for wearable profile
83 Requires: %{name} = %{version}-%{release}
84 Conflicts: %{name}-profile_mobile
85 Conflicts: %{name}-profile_common
86 Conflicts: %{name}-profile_tv
87 Conflicts: %{name}-profile_ivi
88 %description profile_wearable
89 Bluetooth framework configuration and service files for Tizen wearable profile
92 Summary: bluetooth-frwk service and conf files for tv profile
93 Requires: %{name} = %{version}-%{release}
94 Conflicts: %{name}-profile_mobile
95 Conflicts: %{name}-profile_wearable
96 Conflicts: %{name}-profile_common
97 Conflicts: %{name}-profile_ivi
98 %description profile_tv
99 Bluetooth framework configuration and service files for Tizen tv profile
102 Summary: bluetooth-frwk service and conf files for ivi profile
103 Requires: %{name} = %{version}-%{release}
104 Conflicts: %{name}-profile_mobile
105 Conflicts: %{name}-profile_wearable
106 Conflicts: %{name}-profile_tv
107 Conflicts: %{name}-profile_common
108 %description profile_ivi
109 Bluetooth framework configuration and service files for Tizen ivi profile
111 %ifarch %{ix86} x86_64
112 %package extension-emulator
113 Summary: bluetooth-frwk service and conf files for emulator
114 Requires: %{name} = %{version}-%{release}
115 %description extension-emulator
116 bluetooth-frwk service and conf files for emulator
117 %endif // ifarch %{ix86} x86_64
120 Summary: Bluetooth framework for BlueZ and Obexd
121 Group: Development/Libraries
122 Requires: %{name} = %{version}-%{release}
125 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
126 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
129 Summary: Bluetooth Service daemon
130 Group: Network & Connectivity/Bluetooth
131 Requires: %{name} = %{version}-%{release}
134 This package is Bluetooth Service daemon to manage BT services.
137 Summary: Bluetooth HTTP Proxy Service daemon
139 Requires: %{name} = %{version}-%{release}
141 %description httpproxy
142 This package is Bluetooth HTTP Proxy Service daemon
145 Summary: Bluetooth OTP Service daemon
146 Group: Network & Connectivity/Bluetooth
147 Requires: %{name} = %{version}-%{release}
150 This package is Bluetooth OTP Service daemon
153 Summary: Bluetooth Core daemon
154 Group: Network & Connectivity/Bluetooth
155 Requires: %{name} = %{version}-%{release}
158 This package is Bluetooth core daemon to manage activation / deactivation.
161 Summary: Bluetooth test application
162 Group: Network & Connectivity/Bluetooth
163 Requires: %{name} = %{version}-%{release}
166 This package is Bluetooth test application.
168 %package plugin-headed
169 Summary: Bluetooth plugin Headed
170 Group: Network & Connectivity/Bluetooth
171 Requires: %{name} = %{version}-%{release}
173 %description plugin-headed
174 This package is Bluetooth plugin to manage UI and syspopup
182 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
183 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
184 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
187 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
188 export CFLAGS+=" -DARCH64"
189 export CXXFLAGS+=" -DARCH64"
190 export FFLAGS+=" -DARCH64"
192 export CFLAGS="$CFLAGS -fpie"
193 export LDFLAGS="$CFLAGS -pie"
196 %ifarch %{ix86} x86_64
197 export CFLAGS+=" -DTIZEN_TEST_EMUL"
198 export CXXFLAGS+=" -DTIZEN_TEST_EMUL"
199 export FFLAGS+=" -DTIZEN_TEST_EMUL"
202 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
203 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
207 export CFLAGS+=" -DARCH64"
208 export CXXFLAGS+=" -DARCH64"
209 export FFLAGS+=" -DARCH64"
212 export CFLAGS_DEFAULT="$CFLAGS"
213 export CXXFLAGS_DEFAULT="$CXXFLAGS"
214 export FFLAGS_DEFAULT="$FFLAGS"
217 %ifarch %{ix86} || %{arm}
219 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
220 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
221 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
223 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
224 -DCMAKE_LIB_DIR=%{_libdir} \
225 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
226 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
227 -DLIBNOTIFY_SUPPORT=Off \
228 -DLIBNOTIFICATION_SUPPORT=Off
234 cp %{buildroot}%{_bindir}/bt-core tm1/bt-core.tm1
238 %ifarch %{ix86} x86_64
239 export CFLAGS="${CFLAGS_BASE} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
240 export CXXFLAGS="${CXXFLAGS_BASE} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
241 export FFLAGS="${FFLAGS_BASE} -DTIZEN_TEST_EMUL -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
243 mkdir -p build_emulator
245 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
246 -DCMAKE_LIB_DIR=%{_libdir} \
247 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
248 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
249 -DLIBNOTIFY_SUPPORT=Off \
250 -DLIBNOTIFICATION_SUPPORT=Off
256 cp %{buildroot}%{_libdir}/libbluetooth-api.so* build_emulator/
257 pushd build_emulator/
258 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
262 # non-extension-TM1 / non-extension-emulator
264 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
265 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
266 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
268 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
269 -DCMAKE_LIB_DIR=%{_libdir} \
270 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
271 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
272 -DLIBNOTIFY_SUPPORT=Off \
273 -DLIBNOTIFICATION_SUPPORT=Off
282 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
283 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
286 %ifarch %{ix86} x86_64
287 cp build_emulator/libbluetooth-api.so*.emulator %{buildroot}%{_libdir}/
288 mv %{buildroot}/%{_bindir}/bt-service-emul %{buildroot}/%{_bindir}/bt-service
291 # Rename the postfix (.mobile, .tv, ..) at post script
293 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
296 %ifarch %{ix86} || %{arm}
297 cp tm1/bt-core.tm1 %{buildroot}%{_bindir}/
298 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tm1
302 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
303 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
304 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
305 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
308 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
311 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
313 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
314 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
316 %postun -p /sbin/ldconfig
319 %manifest %{name}.manifest
321 %defattr(-, root, root)
322 %{_libdir}/libbluetooth-api.so.*
323 %exclude %{_libdir}/libbluetooth-api.so*.emulator
326 %defattr(-, root, root)
327 %{_includedir}/bt-service/bluetooth-api.h
328 %{_includedir}/bt-service/bluetooth-hid-api.h
329 %{_includedir}/bt-service/bluetooth-audio-api.h
330 %{_includedir}/bt-service/bluetooth-telephony-api.h
331 %{_includedir}/bt-service/bluetooth-media-control.h
332 %{_includedir}/bt-service/bluetooth-scmst-api.h
333 %{_includedir}/bt-service/bluetooth-ipsp-api.h
334 %{_libdir}/pkgconfig/bluetooth-api.pc
335 %{_libdir}/libbluetooth-api.so
338 %ifarch %{ix86} x86_64
339 %post extension-emulator
341 for FILE in libbluetooth-api.so*.emulator; do mv "${FILE}" "${FILE%.emulator}"; done
343 %preun extension-emulator
345 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
347 %files extension-emulator
348 %manifest %{name}.manifest
349 %defattr(-, root, root)
350 %{_libdir}/libbluetooth-api.so.*.emulator
351 %{_libdir}/libbluetooth-api.so.emulator
355 %manifest %{name}.manifest
357 %defattr(-, root, root)
358 %{_bindir}/bt-service
359 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
360 %{_bindir}/bluetooth-frwk-test
361 %{_varlibdir}/bluetooth
362 %{_prefix}/etc/bluetooth
365 %manifest %{name}.manifest
367 %defattr(-, root, root)
368 %{_bindir}/bt-httpproxy
369 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
370 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
374 %manifest %{name}.manifest
376 %defattr(-, root, root)
378 %{_datadir}/dbus-1/system-services/org.projectx.otp.service
379 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-otp.conf
382 %manifest %{name}.manifest
384 %defattr(-, root, root)
385 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
387 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
390 %manifest %{name}.manifest
392 %defattr(-, root, root)
393 %{_bindir}/bluetooth-frwk-test
394 #{_bindir}/bluetooth-gatt-test
395 #{_bindir}/bluetooth-advertising-test
398 %manifest %{name}.manifest
400 %defattr(-, root, root)
401 %{_libdir}/bt-plugin-headed.so
405 mv bluetooth-frwk.service.common bluetooth-frwk.service
407 %preun profile_common
409 mv bluetooth-frwk.service bluetooth-frwk.service.common
411 %files profile_common
413 %{_unitdir}/starter.target.wants/bluetooth-frwk.service
414 %{_unitdir}/bluetooth-frwk.service.common
415 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
419 mv bluetooth-frwk.service.mobile bluetooth-frwk.service
421 %preun profile_mobile
423 mv bluetooth-frwk.service bluetooth-frwk.service.mobile
425 %files profile_mobile
427 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
428 %{_unitdir}/bluetooth-frwk.service.mobile
429 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
432 %ifarch %{ix86} || %{arm}
435 mv bluetooth-frwk.service.tm1 bluetooth-frwk.service
438 mv bt-core.tm1 bt-core
442 mv bluetooth-frwk.service bluetooth-frwk.service.tm1
445 mv bt-core bt-core.tm1
448 %{_unitdir}/bluetooth-frwk.service.tm1
450 %defattr(-, root, root)
451 %{_bindir}/bt-core.tm1
454 %post profile_wearable
456 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
458 %preun profile_wearable
460 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
462 %files profile_wearable
464 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
465 %{_unitdir}/bluetooth-frwk.service.wearable
466 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
470 mv bluetooth-frwk.service.tv bluetooth-frwk.service
474 mv bluetooth-frwk.service bluetooth-frwk.service.tv
478 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
479 %{_unitdir}/bluetooth-frwk.service.tv
480 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
482 # Note: ivi reuses bluetooth-frwk.service.wearable
485 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
487 pushd %{_datadir}/dbus-1/system-services
488 mv org.projectx.bt.service.ivi org.projectx.bt.service
492 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
494 pushd %{_datadir}/dbus-1/system-services
495 mv org.projectx.bt.service org.projectx.bt.service.ivi
499 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
500 %{_unitdir}/bluetooth-frwk.service.wearable
501 %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
503 ### added /usr/etc/bluetooth/wearable/stack_info (others: /usr/etc/bluetooth/stack_info))
504 # (for PROFILE WEARABLE)