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
15 %if "%{?profile}" != "mobile"
16 Requires: bluetooth-tools
18 BuildRequires: pkgconfig(aul)
19 BuildRequires: pkgconfig(dlog)
20 BuildRequires: pkgconfig(glib-2.0)
21 BuildRequires: pkgconfig(gio-2.0)
22 BuildRequires: pkgconfig(gio-unix-2.0)
23 BuildRequires: pkgconfig(syspopup-caller)
24 BuildRequires: pkgconfig(vconf)
25 BuildRequires: pkgconfig(libxml-2.0)
26 BuildRequires: pkgconfig(capi-network-connection)
27 BuildRequires: pkgconfig(alarm-service)
28 BuildRequires: pkgconfig(capi-content-mime-type)
29 BuildRequires: pkgconfig(appcore-efl)
30 BuildRequires: pkgconfig(pkgmgr)
31 #BuildRequires: pkgconfig(journal)
32 BuildRequires: pkgconfig(eventsystem)
33 BuildRequires: pkgconfig(libsoup-2.4)
34 BuildRequires: pkgconfig(capi-network-tethering)
36 BuildRequires: pkgconfig(cynara-client)
37 BuildRequires: pkgconfig(cynara-creds-gdbus)
38 BuildRequires: pkgconfig(libtzplatform-config)
39 BuildRequires: pkgconfig(storage)
40 BuildRequires: pkgconfig(capi-system-info)
42 Requires(post): /usr/bin/vconftool
43 Requires(post): /sbin/ldconfig
44 Requires(postun): /sbin/ldconfig
48 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
49 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
51 %package profile_common
52 Summary: bluetooth-frwk service and conf files for common profile
53 Requires: %{name} = %{version}-%{release}
54 Conflicts: %{name}-profile_mobile
55 Conflicts: %{name}-profile_wearable
56 Conflicts: %{name}-profile_tv
57 Conflicts: %{name}-profile_ivi
58 %description profile_common
59 Bluetooth framework configuration and service files for Tizen common profile
61 %package profile_mobile
62 Summary: bluetooth-frwk service and conf files for mobile profile
63 Requires: %{name} = %{version}-%{release}
64 Conflicts: %{name}-profile_common
65 Conflicts: %{name}-profile_wearable
66 Conflicts: %{name}-profile_tv
67 Conflicts: %{name}-profile_ivi
68 %description profile_mobile
69 Bluetooth framework configuration and service files for Tizen mobile profile
72 %ifarch %{ix86} || %{arm}
73 %package extension-TM1
74 Summary: bluetooth-frwk service and conf files for mobile TM1
75 Requires: %{name}-profile_mobile = %{version}-%{release}
76 %description extension-TM1
77 Bluetooth framework configuration and service files for Tizen mobile TM1
80 %package profile_wearable
81 Summary: bluetooth-frwk service and conf files for wearable profile
82 Requires: %{name} = %{version}-%{release}
83 Conflicts: %{name}-profile_mobile
84 Conflicts: %{name}-profile_common
85 Conflicts: %{name}-profile_tv
86 Conflicts: %{name}-profile_ivi
87 %description profile_wearable
88 Bluetooth framework configuration and service files for Tizen wearable profile
91 Summary: bluetooth-frwk service and conf files for tv profile
92 Requires: %{name} = %{version}-%{release}
93 Conflicts: %{name}-profile_mobile
94 Conflicts: %{name}-profile_wearable
95 Conflicts: %{name}-profile_common
96 Conflicts: %{name}-profile_ivi
97 %description profile_tv
98 Bluetooth framework configuration and service files for Tizen tv profile
101 Summary: bluetooth-frwk service and conf files for ivi profile
102 Requires: %{name} = %{version}-%{release}
103 Conflicts: %{name}-profile_mobile
104 Conflicts: %{name}-profile_wearable
105 Conflicts: %{name}-profile_tv
106 Conflicts: %{name}-profile_common
107 %description profile_ivi
108 Bluetooth framework configuration and service files for Tizen ivi profile
111 Summary: Bluetooth framework for BlueZ and Obexd
112 Group: Development/Libraries
113 Requires: %{name} = %{version}-%{release}
116 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
117 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
120 Summary: Bluetooth Service daemon
121 Group: Network & Connectivity/Bluetooth
122 Requires: %{name} = %{version}-%{release}
125 This package is Bluetooth Service daemon to manage BT services.
128 Summary: Bluetooth HTTP Proxy Service daemon
130 Requires: %{name} = %{version}-%{release}
132 %description httpproxy
133 This package is Bluetooth HTTP Proxy Service daemon
136 Summary: Bluetooth Core daemon
137 Group: Network & Connectivity/Bluetooth
138 Requires: %{name} = %{version}-%{release}
141 This package is Bluetooth core daemon to manage activation / deactivation.
144 Summary: Bluetooth test application
145 Group: Network & Connectivity/Bluetooth
146 Requires: %{name} = %{version}-%{release}
149 This package is Bluetooth test application.
157 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
158 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
159 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
162 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
163 export CFLAGS+=" -DARCH64"
164 export CXXFLAGS+=" -DARCH64"
165 export FFLAGS+=" -DARCH64"
167 export CFLAGS="$CFLAGS -fpie"
168 export LDFLAGS="$CFLAGS -pie"
171 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
172 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
174 %if "%{?_with_emulator}" == "1"
175 export CFLAGS="$CFLAGS -DTIZEN_TEST_EMUL"
176 export CXXFLAGS="$CXXFLAGS -DTIZEN_TEST_EMUL"
177 export FFLAGS="$FFLAGS -DTIZEN_TEST_EMUL"
182 export CFLAGS+=" -DARCH64"
183 export CXXFLAGS+=" -DARCH64"
184 export FFLAGS+=" -DARCH64"
187 export CFLAGS_DEFAULT="$CFLAGS"
188 export CXXFLAGS_DEFAULT="$CXXFLAGS"
189 export FFLAGS_DEFAULT="$FFLAGS"
192 %ifarch %{ix86} || %{arm}
194 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO"
195 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO"
196 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO"
198 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
199 -DCMAKE_LIB_DIR=%{_libdir} \
200 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
201 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
202 -DLIBNOTIFY_SUPPORT=Off \
203 -DLIBNOTIFICATION_SUPPORT=Off
209 cp %{buildroot}%{_bindir}/bt-core tm1/bt-core.tm1
213 export CFLAGS="$CFLAGS_DEFAULT"
214 export CXXFLAGS="$CXXFLAGS_DEFAULT"
215 export FFLAGS="$FFLAGS_DEFAULT"
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
231 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
232 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
233 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy
234 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
236 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
237 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
239 # Rename the postfix (.mobile, .tv, ..) at post script
241 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
244 %ifarch %{ix86} || %{arm}
245 cp tm1/bt-core.tm1 %{buildroot}%{_bindir}/
246 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tm1
250 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
251 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
252 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
253 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
256 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
259 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
261 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
262 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
264 %postun -p /sbin/ldconfig
267 %manifest %{name}.manifest
268 %defattr(-, root, root)
269 %{_libdir}/libbluetooth-api.so.*
270 %{_datadir}/license/bluetooth-frwk
273 %defattr(-, root, root)
274 %{_includedir}/bt-service/bluetooth-api.h
275 %{_includedir}/bt-service/bluetooth-hid-api.h
276 %{_includedir}/bt-service/bluetooth-audio-api.h
277 %{_includedir}/bt-service/bluetooth-telephony-api.h
278 %{_includedir}/bt-service/bluetooth-media-control.h
279 %{_includedir}/bt-service/bluetooth-scmst-api.h
280 %{_includedir}/bt-service/bluetooth-ipsp-api.h
281 %{_libdir}/pkgconfig/bluetooth-api.pc
282 %{_libdir}/libbluetooth-api.so
283 %{_datadir}/license/bluetooth-frwk-devel
286 %manifest %{name}.manifest
287 %defattr(-, root, root)
288 %{_bindir}/bt-service
289 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
290 %{_bindir}/bluetooth-frwk-test
291 %{_varlibdir}/bluetooth
292 %{_prefix}/etc/bluetooth
293 %{_datadir}/license/bluetooth-frwk-service
296 %manifest %{name}.manifest
297 %defattr(-, root, root)
298 %{_bindir}/bt-httpproxy
299 %{_datadir}/license/bluetooth-frwk-httpproxy
300 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
301 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
304 %manifest %{name}.manifest
305 %defattr(-, root, root)
306 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
308 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
311 %manifest %{name}.manifest
312 %defattr(-, root, root)
313 %{_bindir}/bluetooth-frwk-test
314 #{_bindir}/bluetooth-gatt-test
315 #{_bindir}/bluetooth-advertising-test
319 mv bluetooth-frwk.service.common bluetooth-frwk.service
321 %preun profile_common
323 mv bluetooth-frwk.service bluetooth-frwk.service.common
325 %files profile_common
326 %{_unitdir}/starter.target.wants/bluetooth-frwk.service
327 %{_unitdir}/bluetooth-frwk.service.common
328 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
332 mv bluetooth-frwk.service.mobile bluetooth-frwk.service
334 %preun profile_mobile
336 mv bluetooth-frwk.service bluetooth-frwk.service.mobile
338 %files profile_mobile
339 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
340 %{_unitdir}/bluetooth-frwk.service.mobile
341 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
344 %ifarch %{ix86} || %{arm}
347 mv bluetooth-frwk.service.tm1 bluetooth-frwk.service
350 mv bt-core.tm1 bt-core
354 mv bluetooth-frwk.service bluetooth-frwk.service.tm1
357 mv bt-core bt-core.tm1
360 %{_unitdir}/bluetooth-frwk.service.tm1
361 %defattr(-, root, root)
362 %{_bindir}/bt-core.tm1
365 %post profile_wearable
367 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
369 %preun profile_wearable
371 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
373 %files profile_wearable
374 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
375 %{_unitdir}/bluetooth-frwk.service.wearable
376 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
380 mv bluetooth-frwk.service.tv bluetooth-frwk.service
384 mv bluetooth-frwk.service bluetooth-frwk.service.tv
387 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
388 %{_unitdir}/bluetooth-frwk.service.tv
389 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
391 # Note: ivi reuses bluetooth-frwk.service.wearable
394 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
396 pushd %{_datadir}/dbus-1/system-services
397 mv org.projectx.bt.service.ivi org.projectx.bt.service
401 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
403 pushd %{_datadir}/dbus-1/system-services
404 mv org.projectx.bt.service org.projectx.bt.service.ivi
407 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
408 %{_unitdir}/bluetooth-frwk.service.wearable
409 %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
411 ### added /usr/etc/bluetooth/wearable/stack_info (others: /usr/etc/bluetooth/stack_info))
412 # (for PROFILE WEARABLE)