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
110 Summary: Bluetooth framework for BlueZ and Obexd
111 Group: Development/Libraries
112 Requires: %{name} = %{version}-%{release}
115 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
116 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
119 Summary: Bluetooth Service daemon
120 Group: Network & Connectivity/Bluetooth
121 Requires: %{name} = %{version}-%{release}
124 This package is Bluetooth Service daemon to manage BT services.
127 Summary: Bluetooth HTTP Proxy Service daemon
129 Requires: %{name} = %{version}-%{release}
131 %description httpproxy
132 This package is Bluetooth HTTP Proxy Service daemon
135 Summary: Bluetooth Core daemon
136 Group: Network & Connectivity/Bluetooth
137 Requires: %{name} = %{version}-%{release}
140 This package is Bluetooth core daemon to manage activation / deactivation.
143 Summary: Bluetooth test application
144 Group: Network & Connectivity/Bluetooth
145 Requires: %{name} = %{version}-%{release}
148 This package is Bluetooth test application.
150 %package plugin-headed
151 Summary: Bluetooth plugin Headed
152 Group: Network & Connectivity/Bluetooth
153 Requires: %{name} = %{version}-%{release}
155 %description plugin-headed
156 This package is Bluetooth plugin to manage UI and syspopup
164 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
165 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
166 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
169 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
170 export CFLAGS+=" -DARCH64"
171 export CXXFLAGS+=" -DARCH64"
172 export FFLAGS+=" -DARCH64"
174 export CFLAGS="$CFLAGS -fpie"
175 export LDFLAGS="$CFLAGS -pie"
178 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
179 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
181 %if "%{?_with_emulator}" == "1"
182 export CFLAGS="$CFLAGS -DTIZEN_TEST_EMUL"
183 export CXXFLAGS="$CXXFLAGS -DTIZEN_TEST_EMUL"
184 export FFLAGS="$FFLAGS -DTIZEN_TEST_EMUL"
189 export CFLAGS+=" -DARCH64"
190 export CXXFLAGS+=" -DARCH64"
191 export FFLAGS+=" -DARCH64"
194 export CFLAGS_DEFAULT="$CFLAGS"
195 export CXXFLAGS_DEFAULT="$CXXFLAGS"
196 export FFLAGS_DEFAULT="$FFLAGS"
199 %ifarch %{ix86} || %{arm}
201 export CFLAGS="$CFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO"
202 export CXXFLAGS="$CXXFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO"
203 export FFLAGS="$FFLAGS_DEFAULT -DTIZEN_FEATURE_RADIO"
205 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
206 -DCMAKE_LIB_DIR=%{_libdir} \
207 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
208 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
209 -DLIBNOTIFY_SUPPORT=Off \
210 -DLIBNOTIFICATION_SUPPORT=Off
216 cp %{buildroot}%{_bindir}/bt-core tm1/bt-core.tm1
220 export CFLAGS="$CFLAGS_DEFAULT"
221 export CXXFLAGS="$CXXFLAGS_DEFAULT"
222 export FFLAGS="$FFLAGS_DEFAULT"
224 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
225 -DCMAKE_LIB_DIR=%{_libdir} \
226 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
227 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
228 -DLIBNOTIFY_SUPPORT=Off \
229 -DLIBNOTIFICATION_SUPPORT=Off
238 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
239 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
240 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy
241 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
243 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
244 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
246 # Rename the postfix (.mobile, .tv, ..) at post script
248 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
251 %ifarch %{ix86} || %{arm}
252 cp tm1/bt-core.tm1 %{buildroot}%{_bindir}/
253 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tm1
257 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
258 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
259 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
260 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
263 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
266 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
268 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
269 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
271 %postun -p /sbin/ldconfig
274 %manifest %{name}.manifest
275 %defattr(-, root, root)
276 %{_libdir}/libbluetooth-api.so.*
277 %{_datadir}/license/bluetooth-frwk
280 %defattr(-, root, root)
281 %{_includedir}/bt-service/bluetooth-api.h
282 %{_includedir}/bt-service/bluetooth-hid-api.h
283 %{_includedir}/bt-service/bluetooth-audio-api.h
284 %{_includedir}/bt-service/bluetooth-telephony-api.h
285 %{_includedir}/bt-service/bluetooth-media-control.h
286 %{_includedir}/bt-service/bluetooth-scmst-api.h
287 %{_includedir}/bt-service/bluetooth-ipsp-api.h
288 %{_libdir}/pkgconfig/bluetooth-api.pc
289 %{_libdir}/libbluetooth-api.so
290 %{_datadir}/license/bluetooth-frwk-devel
293 %manifest %{name}.manifest
294 %defattr(-, root, root)
295 %{_bindir}/bt-service
296 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
297 %{_bindir}/bluetooth-frwk-test
298 %{_varlibdir}/bluetooth
299 %{_prefix}/etc/bluetooth
300 %{_datadir}/license/bluetooth-frwk-service
303 %manifest %{name}.manifest
304 %defattr(-, root, root)
305 %{_bindir}/bt-httpproxy
306 %{_datadir}/license/bluetooth-frwk-httpproxy
307 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
308 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
311 %manifest %{name}.manifest
312 %defattr(-, root, root)
313 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
315 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
318 %manifest %{name}.manifest
319 %defattr(-, root, root)
320 %{_bindir}/bluetooth-frwk-test
321 #{_bindir}/bluetooth-gatt-test
322 #{_bindir}/bluetooth-advertising-test
325 %manifest %{name}.manifest
326 %defattr(-, root, root)
327 %{_libdir}/bt-plugin-headed.so
331 mv bluetooth-frwk.service.common bluetooth-frwk.service
333 %preun profile_common
335 mv bluetooth-frwk.service bluetooth-frwk.service.common
337 %files profile_common
338 %{_unitdir}/starter.target.wants/bluetooth-frwk.service
339 %{_unitdir}/bluetooth-frwk.service.common
340 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
344 mv bluetooth-frwk.service.mobile bluetooth-frwk.service
346 %preun profile_mobile
348 mv bluetooth-frwk.service bluetooth-frwk.service.mobile
350 %files profile_mobile
351 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
352 %{_unitdir}/bluetooth-frwk.service.mobile
353 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
356 %ifarch %{ix86} || %{arm}
359 mv bluetooth-frwk.service.tm1 bluetooth-frwk.service
362 mv bt-core.tm1 bt-core
366 mv bluetooth-frwk.service bluetooth-frwk.service.tm1
369 mv bt-core bt-core.tm1
372 %{_unitdir}/bluetooth-frwk.service.tm1
373 %defattr(-, root, root)
374 %{_bindir}/bt-core.tm1
377 %post profile_wearable
379 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
381 %preun profile_wearable
383 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
385 %files profile_wearable
386 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
387 %{_unitdir}/bluetooth-frwk.service.wearable
388 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
392 mv bluetooth-frwk.service.tv bluetooth-frwk.service
396 mv bluetooth-frwk.service bluetooth-frwk.service.tv
399 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
400 %{_unitdir}/bluetooth-frwk.service.tv
401 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
403 # Note: ivi reuses bluetooth-frwk.service.wearable
406 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
408 pushd %{_datadir}/dbus-1/system-services
409 mv org.projectx.bt.service.ivi org.projectx.bt.service
413 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
415 pushd %{_datadir}/dbus-1/system-services
416 mv org.projectx.bt.service org.projectx.bt.service.ivi
419 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
420 %{_unitdir}/bluetooth-frwk.service.wearable
421 %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
423 ### added /usr/etc/bluetooth/wearable/stack_info (others: /usr/etc/bluetooth/stack_info))
424 # (for PROFILE WEARABLE)