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
71 %package profile_wearable
72 Summary: bluetooth-frwk service and conf files for wearable profile
73 Requires: %{name} = %{version}-%{release}
74 Conflicts: %{name}-profile_mobile
75 Conflicts: %{name}-profile_common
76 Conflicts: %{name}-profile_tv
77 Conflicts: %{name}-profile_ivi
78 %description profile_wearable
79 Bluetooth framework configuration and service files for Tizen wearable profile
82 Summary: bluetooth-frwk service and conf files for tv profile
83 Requires: %{name} = %{version}-%{release}
84 Conflicts: %{name}-profile_mobile
85 Conflicts: %{name}-profile_wearable
86 Conflicts: %{name}-profile_common
87 Conflicts: %{name}-profile_ivi
88 %description profile_tv
89 Bluetooth framework configuration and service files for Tizen tv profile
92 Summary: bluetooth-frwk service and conf files for ivi profile
93 Requires: %{name} = %{version}-%{release}
94 Conflicts: %{name}-profile_mobile
95 Conflicts: %{name}-profile_wearable
96 Conflicts: %{name}-profile_tv
97 Conflicts: %{name}-profile_common
98 %description profile_ivi
99 Bluetooth framework configuration and service files for Tizen ivi profile
102 Summary: Bluetooth framework for BlueZ and Obexd
103 Group: Development/Libraries
104 Requires: %{name} = %{version}-%{release}
107 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
108 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
111 Summary: Bluetooth Service daemon
112 Group: Network & Connectivity/Bluetooth
113 Requires: %{name} = %{version}-%{release}
116 This package is Bluetooth Service daemon to manage BT services.
119 Summary: Bluetooth HTTP Proxy Service daemon
121 Requires: %{name} = %{version}-%{release}
123 %description httpproxy
124 This package is Bluetooth HTTP Proxy Service daemon
127 Summary: Bluetooth Core daemon
128 Group: Network & Connectivity/Bluetooth
129 Requires: %{name} = %{version}-%{release}
132 This package is Bluetooth core daemon to manage activation / deactivation.
135 Summary: Bluetooth test application
136 Group: Network & Connectivity/Bluetooth
137 Requires: %{name} = %{version}-%{release}
140 This package is Bluetooth test application.
148 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
149 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
150 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
153 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
155 export CFLAGS="$CFLAGS -fpie"
156 export LDFLAGS="$CFLAGS -pie"
159 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
160 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
162 %if "%{?_with_emulator}" == "1"
163 export CFLAGS="$CFLAGS -DTIZEN_TEST_EMUL"
164 export CXXFLAGS="$CXXFLAGS -DTIZEN_TEST_EMUL"
165 export FFLAGS="$FFLAGS -DTIZEN_TEST_EMUL"
169 %if "%{?tizen_target_name}" == "TM1"
170 export CFLAGS="${CFLAGS} -DTIZEN_FEATURE_RADIO"
171 export CXXFLAGS="$CXXFLAGS -DTIZEN_FEATURE_RADIO"
172 export FFLAGS="$FFLAGS -DTIZEN_FEATURE_RADIO"
177 export CFLAGS+=" -DARCH64"
178 export CXXFLAGS+=" -DARCH64"
179 export FFLAGS+=" -DARCH64"
182 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
183 -DCMAKE_LIB_DIR=%{_libdir} \
184 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
185 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
186 -DLIBNOTIFY_SUPPORT=Off \
187 -DLIBNOTIFICATION_SUPPORT=Off
196 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
197 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
198 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy
199 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
201 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
202 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
204 # Rename the postfix (.mobile, .tv, ..) at post script
206 %if "%{?tizen_target_name}" == "TM1"
207 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
209 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
213 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
214 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
215 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
216 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
219 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
222 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
224 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
225 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
227 %postun -p /sbin/ldconfig
230 %manifest %{name}.manifest
231 %defattr(-, root, root)
232 %{_libdir}/libbluetooth-api.so.*
233 %{_datadir}/license/bluetooth-frwk
236 %defattr(-, root, root)
237 %{_includedir}/bt-service/bluetooth-api.h
238 %{_includedir}/bt-service/bluetooth-hid-api.h
239 %{_includedir}/bt-service/bluetooth-audio-api.h
240 %{_includedir}/bt-service/bluetooth-telephony-api.h
241 %{_includedir}/bt-service/bluetooth-media-control.h
242 %{_includedir}/bt-service/bluetooth-scmst-api.h
243 %{_includedir}/bt-service/bluetooth-ipsp-api.h
244 %{_libdir}/pkgconfig/bluetooth-api.pc
245 %{_libdir}/libbluetooth-api.so
246 %{_datadir}/license/bluetooth-frwk-devel
249 %manifest %{name}.manifest
250 %defattr(-, root, root)
251 %{_bindir}/bt-service
252 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
253 %{_bindir}/bluetooth-frwk-test
254 %{_varlibdir}/bluetooth
255 %{_prefix}/etc/bluetooth
256 %{_datadir}/license/bluetooth-frwk-service
259 %manifest %{name}.manifest
260 %defattr(-, root, root)
261 %{_bindir}/bt-httpproxy
262 %{_datadir}/license/bluetooth-frwk-httpproxy
263 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
264 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
267 %manifest %{name}.manifest
268 %defattr(-, root, root)
269 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
271 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
274 %manifest %{name}.manifest
275 %defattr(-, root, root)
276 %{_bindir}/bluetooth-frwk-test
277 #{_bindir}/bluetooth-gatt-test
278 #{_bindir}/bluetooth-advertising-test
282 mv bluetooth-frwk.service.common bluetooth-frwk.service
284 %preun profile_common
286 mv bluetooth-frwk.service bluetooth-frwk.service.common
288 %files profile_common
289 %{_unitdir}/starter.target.wants/bluetooth-frwk.service
290 %{_unitdir}/bluetooth-frwk.service.common
291 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
295 mv bluetooth-frwk.service.mobile bluetooth-frwk.service
297 %preun profile_mobile
299 mv bluetooth-frwk.service bluetooth-frwk.service.mobile
301 %files profile_mobile
302 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
303 %{_unitdir}/bluetooth-frwk.service.mobile
304 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
306 %post profile_wearable
308 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
310 %preun profile_wearable
312 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
314 %files profile_wearable
315 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
316 %{_unitdir}/bluetooth-frwk.service.wearable
317 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
321 mv bluetooth-frwk.service.tv bluetooth-frwk.service
325 mv bluetooth-frwk.service bluetooth-frwk.service.tv
328 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
329 %{_unitdir}/bluetooth-frwk.service.tv
330 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
332 # Note: ivi reuses bluetooth-frwk.service.wearable
335 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
337 pushd %{_datadir}/dbus-1/system-services
338 mv org.projectx.bt.service.ivi org.projectx.bt.service
342 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
344 pushd %{_datadir}/dbus-1/system-services
345 mv org.projectx.bt.service org.projectx.bt.service.ivi
348 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
349 %{_unitdir}/bluetooth-frwk.service.wearable
350 %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
352 ### added /usr/etc/bluetooth/wearable/stack_info (others: /usr/etc/bluetooth/stack_info))
353 # (for PROFILE WEARABLE)