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 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
239 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
241 # Rename the postfix (.mobile, .tv, ..) at post script
243 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
246 %ifarch %{ix86} || %{arm}
247 cp tm1/bt-core.tm1 %{buildroot}%{_bindir}/
248 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tm1
252 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
253 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
254 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
255 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
258 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
261 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
263 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
264 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
266 %postun -p /sbin/ldconfig
269 %manifest %{name}.manifest
271 %defattr(-, root, root)
272 %{_libdir}/libbluetooth-api.so.*
275 %defattr(-, root, root)
276 %{_includedir}/bt-service/bluetooth-api.h
277 %{_includedir}/bt-service/bluetooth-hid-api.h
278 %{_includedir}/bt-service/bluetooth-audio-api.h
279 %{_includedir}/bt-service/bluetooth-telephony-api.h
280 %{_includedir}/bt-service/bluetooth-media-control.h
281 %{_includedir}/bt-service/bluetooth-scmst-api.h
282 %{_includedir}/bt-service/bluetooth-ipsp-api.h
283 %{_libdir}/pkgconfig/bluetooth-api.pc
284 %{_libdir}/libbluetooth-api.so
287 %manifest %{name}.manifest
289 %defattr(-, root, root)
290 %{_bindir}/bt-service
291 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
292 %{_bindir}/bluetooth-frwk-test
293 %{_varlibdir}/bluetooth
294 %{_prefix}/etc/bluetooth
297 %manifest %{name}.manifest
299 %defattr(-, root, root)
300 %{_bindir}/bt-httpproxy
301 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
302 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
305 %manifest %{name}.manifest
307 %defattr(-, root, root)
308 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
310 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
313 %manifest %{name}.manifest
315 %defattr(-, root, root)
316 %{_bindir}/bluetooth-frwk-test
317 #{_bindir}/bluetooth-gatt-test
318 #{_bindir}/bluetooth-advertising-test
321 %manifest %{name}.manifest
323 %defattr(-, root, root)
324 %{_libdir}/bt-plugin-headed.so
328 mv bluetooth-frwk.service.common bluetooth-frwk.service
330 %preun profile_common
332 mv bluetooth-frwk.service bluetooth-frwk.service.common
334 %files profile_common
336 %{_unitdir}/starter.target.wants/bluetooth-frwk.service
337 %{_unitdir}/bluetooth-frwk.service.common
338 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
342 mv bluetooth-frwk.service.mobile bluetooth-frwk.service
344 %preun profile_mobile
346 mv bluetooth-frwk.service bluetooth-frwk.service.mobile
348 %files profile_mobile
350 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
351 %{_unitdir}/bluetooth-frwk.service.mobile
352 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
355 %ifarch %{ix86} || %{arm}
358 mv bluetooth-frwk.service.tm1 bluetooth-frwk.service
361 mv bt-core.tm1 bt-core
365 mv bluetooth-frwk.service bluetooth-frwk.service.tm1
368 mv bt-core bt-core.tm1
371 %{_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
387 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
388 %{_unitdir}/bluetooth-frwk.service.wearable
389 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
393 mv bluetooth-frwk.service.tv bluetooth-frwk.service
397 mv bluetooth-frwk.service bluetooth-frwk.service.tv
401 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
402 %{_unitdir}/bluetooth-frwk.service.tv
403 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
405 # Note: ivi reuses bluetooth-frwk.service.wearable
408 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
410 pushd %{_datadir}/dbus-1/system-services
411 mv org.projectx.bt.service.ivi org.projectx.bt.service
415 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
417 pushd %{_datadir}/dbus-1/system-services
418 mv org.projectx.bt.service org.projectx.bt.service.ivi
422 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
423 %{_unitdir}/bluetooth-frwk.service.wearable
424 %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
426 ### added /usr/etc/bluetooth/wearable/stack_info (others: /usr/etc/bluetooth/stack_info))
427 # (for PROFILE WEARABLE)