2 %define _dumpdir /opt/etc/dump.d/module.d
3 %define _varlibdir /opt/var/lib
6 Summary: Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
9 Group: Network & Connectivity/Bluetooth
11 Source0: %{name}-%{version}.tar.gz
12 Source1001: bluetooth-frwk.manifest
14 %if "%{?profile}" != "mobile"
15 Requires: bluetooth-tools
17 BuildRequires: pkgconfig(aul)
18 BuildRequires: pkgconfig(dlog)
19 BuildRequires: pkgconfig(glib-2.0)
20 BuildRequires: pkgconfig(gio-2.0)
21 BuildRequires: pkgconfig(gio-unix-2.0)
22 BuildRequires: pkgconfig(syspopup-caller)
23 BuildRequires: pkgconfig(vconf)
24 BuildRequires: pkgconfig(libxml-2.0)
25 BuildRequires: pkgconfig(capi-network-connection)
26 BuildRequires: pkgconfig(alarm-service)
27 BuildRequires: pkgconfig(capi-content-mime-type)
28 BuildRequires: pkgconfig(appcore-efl)
29 BuildRequires: pkgconfig(pkgmgr)
30 #BuildRequires: pkgconfig(journal)
31 BuildRequires: pkgconfig(eventsystem)
32 BuildRequires: pkgconfig(libsoup-2.4)
33 BuildRequires: pkgconfig(capi-network-tethering)
35 BuildRequires: pkgconfig(cynara-client)
36 BuildRequires: pkgconfig(cynara-creds-gdbus)
37 BuildRequires: pkgconfig(libtzplatform-config)
38 BuildRequires: pkgconfig(storage)
39 BuildRequires: pkgconfig(capi-system-info)
41 Requires(post): /usr/bin/vconftool
42 Requires(post): /sbin/ldconfig
43 Requires(postun): /sbin/ldconfig
47 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
48 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
50 %package profile_common
51 Summary: bluetooth-frwk service and conf files for common profile
52 Requires: %{name} = %{version}-%{release}
53 Conflicts: %{name}-profile_mobile
54 Conflicts: %{name}-profile_wearable
55 Conflicts: %{name}-profile_tv
56 Conflicts: %{name}-profile_ivi
57 %description profile_common
58 Bluetooth framework configuration and service files for Tizen common profile
60 %package profile_mobile
61 Summary: bluetooth-frwk service and conf files for mobile profile
62 Requires: %{name} = %{version}-%{release}
63 Conflicts: %{name}-profile_common
64 Conflicts: %{name}-profile_wearable
65 Conflicts: %{name}-profile_tv
66 Conflicts: %{name}-profile_ivi
67 %description profile_mobile
68 Bluetooth framework configuration and service files for Tizen mobile profile
71 %ifarch %{ix86} || %{arm}
72 %package extension-TM1
73 Summary: bluetooth-frwk service and conf files for mobile TM1
74 Requires: %{name}-profile_mobile = %{version}-%{release}
75 %description extension-TM1
76 Bluetooth framework configuration and service files for Tizen mobile TM1
79 %package profile_wearable
80 Summary: bluetooth-frwk service and conf files for wearable profile
81 Requires: %{name} = %{version}-%{release}
82 Conflicts: %{name}-profile_mobile
83 Conflicts: %{name}-profile_common
84 Conflicts: %{name}-profile_tv
85 Conflicts: %{name}-profile_ivi
86 %description profile_wearable
87 Bluetooth framework configuration and service files for Tizen wearable profile
90 Summary: bluetooth-frwk service and conf files for tv profile
91 Requires: %{name} = %{version}-%{release}
92 Conflicts: %{name}-profile_mobile
93 Conflicts: %{name}-profile_wearable
94 Conflicts: %{name}-profile_common
95 Conflicts: %{name}-profile_ivi
96 %description profile_tv
97 Bluetooth framework configuration and service files for Tizen tv profile
100 Summary: bluetooth-frwk service and conf files for ivi profile
101 Requires: %{name} = %{version}-%{release}
102 Conflicts: %{name}-profile_mobile
103 Conflicts: %{name}-profile_wearable
104 Conflicts: %{name}-profile_tv
105 Conflicts: %{name}-profile_common
106 %description profile_ivi
107 Bluetooth framework configuration and service files for Tizen ivi profile
109 %ifarch %{ix86} x86_64
110 %package extension-emulator
111 Summary: bluetooth-frwk service and conf files for emulator
112 Requires: %{name} = %{version}-%{release}
113 %description extension-emulator
114 bluetooth-frwk service and conf files for emulator
115 %endif // ifarch %{ix86} x86_64
118 Summary: Bluetooth framework for BlueZ and Obexd
119 Group: Development/Libraries
120 Requires: %{name} = %{version}-%{release}
123 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
124 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
127 Summary: Bluetooth Service daemon
128 Group: Network & Connectivity/Bluetooth
129 Requires: %{name} = %{version}-%{release}
132 This package is Bluetooth Service daemon to manage BT services.
135 Summary: Bluetooth HTTP Proxy Service daemon
137 Requires: %{name} = %{version}-%{release}
139 %description httpproxy
140 This package is Bluetooth HTTP Proxy Service daemon
143 Summary: Bluetooth Core daemon
144 Group: Network & Connectivity/Bluetooth
145 Requires: %{name} = %{version}-%{release}
148 This package is Bluetooth core daemon to manage activation / deactivation.
151 Summary: Bluetooth test application
152 Group: Network & Connectivity/Bluetooth
153 Requires: %{name} = %{version}-%{release}
156 This package is Bluetooth test application.
158 %package plugin-headed
159 Summary: Bluetooth plugin Headed
160 Group: Network & Connectivity/Bluetooth
161 Requires: %{name} = %{version}-%{release}
163 %description plugin-headed
164 This package is Bluetooth plugin to manage UI and syspopup
172 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
173 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
174 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
177 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
178 export CFLAGS+=" -DARCH64"
179 export CXXFLAGS+=" -DARCH64"
180 export FFLAGS+=" -DARCH64"
182 export CFLAGS="$CFLAGS -fpie"
183 export LDFLAGS="$CFLAGS -pie"
186 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
187 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
191 export CFLAGS+=" -DARCH64"
192 export CXXFLAGS+=" -DARCH64"
193 export FFLAGS+=" -DARCH64"
196 export CFLAGS_DEFAULT="$CFLAGS"
197 export CXXFLAGS_DEFAULT="$CXXFLAGS"
198 export FFLAGS_DEFAULT="$FFLAGS"
201 %ifarch %{ix86} || %{arm}
203 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO"
204 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO"
205 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO"
207 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
208 -DCMAKE_LIB_DIR=%{_libdir} \
209 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
210 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
211 -DLIBNOTIFY_SUPPORT=Off \
212 -DLIBNOTIFICATION_SUPPORT=Off
218 cp %{buildroot}%{_bindir}/bt-core tm1/bt-core.tm1
222 %ifarch %{ix86} x86_64
223 export CFLAGS="${CFLAGS_BASE} -DTIZEN_TEST_EMUL"
224 export CXXFLAGS="${CXXFLAGS_BASE} -DTIZEN_TEST_EMUL"
225 export FFLAGS="${FFLAGS_BASE} -DTIZEN_TEST_EMUL"
227 mkdir -p build_emulator
229 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
230 -DCMAKE_LIB_DIR=%{_libdir} \
231 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
232 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
233 -DLIBNOTIFY_SUPPORT=Off \
234 -DLIBNOTIFICATION_SUPPORT=Off
240 cp %{buildroot}%{_libdir}/libbluetooth-api.so* build_emulator/
241 pushd build_emulator/
242 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
246 # non-extension-TM1 / non-extension-emulator
248 export CFLAGS="$CFLAGS_DEFAULT"
249 export CXXFLAGS="$CXXFLAGS_DEFAULT"
250 export FFLAGS="$FFLAGS_DEFAULT"
252 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
253 -DCMAKE_LIB_DIR=%{_libdir} \
254 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
255 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
256 -DLIBNOTIFY_SUPPORT=Off \
257 -DLIBNOTIFICATION_SUPPORT=Off
266 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
267 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
270 %ifarch %{ix86} x86_64
271 cp build_emulator/libbluetooth-api.so*.emulator %{buildroot}%{_libdir}/
274 # Rename the postfix (.mobile, .tv, ..) at post script
276 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
279 %ifarch %{ix86} || %{arm}
280 cp tm1/bt-core.tm1 %{buildroot}%{_bindir}/
281 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tm1
285 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
286 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
287 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
288 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
291 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
294 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
296 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
297 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
299 %postun -p /sbin/ldconfig
302 %manifest %{name}.manifest
304 %defattr(-, root, root)
305 %{_libdir}/libbluetooth-api.so.*
306 %exclude %{_libdir}/libbluetooth-api.so*.emulator
309 %defattr(-, root, root)
310 %{_includedir}/bt-service/bluetooth-api.h
311 %{_includedir}/bt-service/bluetooth-hid-api.h
312 %{_includedir}/bt-service/bluetooth-audio-api.h
313 %{_includedir}/bt-service/bluetooth-telephony-api.h
314 %{_includedir}/bt-service/bluetooth-media-control.h
315 %{_includedir}/bt-service/bluetooth-scmst-api.h
316 %{_includedir}/bt-service/bluetooth-ipsp-api.h
317 %{_libdir}/pkgconfig/bluetooth-api.pc
318 %{_libdir}/libbluetooth-api.so
321 %ifarch %{ix86} x86_64
322 %post extension-emulator
324 for FILE in libbluetooth-api.so*.emulator; do mv "${FILE}" "${FILE%.emulator}"; done
326 %preun extension-emulator
328 for FILE in libbluetooth-api.so*; do mv "${FILE}" "${FILE}.emulator"; done
330 %files extension-emulator
331 %manifest %{name}.manifest
332 %defattr(-, root, root)
333 %{_libdir}/libbluetooth-api.so.*.emulator
334 %{_libdir}/libbluetooth-api.so.emulator
338 %manifest %{name}.manifest
340 %defattr(-, root, root)
341 %{_bindir}/bt-service
342 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
343 %{_bindir}/bluetooth-frwk-test
344 %{_varlibdir}/bluetooth
345 %{_prefix}/etc/bluetooth
348 %manifest %{name}.manifest
350 %defattr(-, root, root)
351 %{_bindir}/bt-httpproxy
352 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
353 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
356 %manifest %{name}.manifest
358 %defattr(-, root, root)
359 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
361 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
364 %manifest %{name}.manifest
366 %defattr(-, root, root)
367 %{_bindir}/bluetooth-frwk-test
368 #{_bindir}/bluetooth-gatt-test
369 #{_bindir}/bluetooth-advertising-test
372 %manifest %{name}.manifest
374 %defattr(-, root, root)
375 %{_libdir}/bt-plugin-headed.so
379 mv bluetooth-frwk.service.common bluetooth-frwk.service
381 %preun profile_common
383 mv bluetooth-frwk.service bluetooth-frwk.service.common
385 %files profile_common
387 %{_unitdir}/starter.target.wants/bluetooth-frwk.service
388 %{_unitdir}/bluetooth-frwk.service.common
389 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
393 mv bluetooth-frwk.service.mobile bluetooth-frwk.service
395 %preun profile_mobile
397 mv bluetooth-frwk.service bluetooth-frwk.service.mobile
399 %files profile_mobile
401 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
402 %{_unitdir}/bluetooth-frwk.service.mobile
403 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
406 %ifarch %{ix86} || %{arm}
409 mv bluetooth-frwk.service.tm1 bluetooth-frwk.service
412 mv bt-core.tm1 bt-core
416 mv bluetooth-frwk.service bluetooth-frwk.service.tm1
419 mv bt-core bt-core.tm1
422 %{_unitdir}/bluetooth-frwk.service.tm1
424 %defattr(-, root, root)
425 %{_bindir}/bt-core.tm1
428 %post profile_wearable
430 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
432 %preun profile_wearable
434 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
436 %files profile_wearable
438 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
439 %{_unitdir}/bluetooth-frwk.service.wearable
440 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
444 mv bluetooth-frwk.service.tv bluetooth-frwk.service
448 mv bluetooth-frwk.service bluetooth-frwk.service.tv
452 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
453 %{_unitdir}/bluetooth-frwk.service.tv
454 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
456 # Note: ivi reuses bluetooth-frwk.service.wearable
459 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
461 pushd %{_datadir}/dbus-1/system-services
462 mv org.projectx.bt.service.ivi org.projectx.bt.service
466 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
468 pushd %{_datadir}/dbus-1/system-services
469 mv org.projectx.bt.service org.projectx.bt.service.ivi
473 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
474 %{_unitdir}/bluetooth-frwk.service.wearable
475 %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
477 ### added /usr/etc/bluetooth/wearable/stack_info (others: /usr/etc/bluetooth/stack_info))
478 # (for PROFILE WEARABLE)