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
46 Requires: %{name}-servicescript = %{version}-%{release}
47 Recommends: %{name}-profile_common = %{version}-%{release}
50 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
51 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
53 %package profile_common
54 Summary: bluetooth-frwk service and conf files for common profile
55 Provides: %{name}-servicescript = %{version}-%{release}
56 Conflicts: %{name}-profile_mobile
57 Conflicts: %{name}-profile_wearable
58 Conflicts: %{name}-profile_tv
59 Conflicts: %{name}-profile_ivi
60 %description profile_common
61 Bluetooth framework configuration and service files for Tizen common profile
63 %package profile_mobile
64 Summary: bluetooth-frwk service and conf files for mobile profile
65 Provides: %{name}-servicescript = %{version}-%{release}
66 Conflicts: %{name}-profile_common
67 Conflicts: %{name}-profile_wearable
68 Conflicts: %{name}-profile_tv
69 Conflicts: %{name}-profile_ivi
70 %description profile_mobile
71 Bluetooth framework configuration and service files for Tizen mobile profile
73 %package profile_wearable
74 Summary: bluetooth-frwk service and conf files for wearable profile
75 Provides: %{name}-servicescript = %{version}-%{release}
76 Conflicts: %{name}-profile_mobile
77 Conflicts: %{name}-profile_common
78 Conflicts: %{name}-profile_tv
79 Conflicts: %{name}-profile_ivi
80 %description profile_wearable
81 Bluetooth framework configuration and service files for Tizen wearable profile
84 Summary: bluetooth-frwk service and conf files for tv profile
85 Provides: %{name}-servicescript = %{version}-%{release}
86 Conflicts: %{name}-profile_mobile
87 Conflicts: %{name}-profile_wearable
88 Conflicts: %{name}-profile_common
89 Conflicts: %{name}-profile_ivi
90 %description profile_tv
91 Bluetooth framework configuration and service files for Tizen tv profile
94 Summary: bluetooth-frwk service and conf files for ivi profile
95 Provides: %{name}-servicescript = %{version}-%{release}
96 Conflicts: %{name}-profile_mobile
97 Conflicts: %{name}-profile_wearable
98 Conflicts: %{name}-profile_tv
99 Conflicts: %{name}-profile_common
100 %description profile_ivi
101 Bluetooth framework configuration and service files for Tizen ivi profile
104 Summary: Bluetooth framework for BlueZ and Obexd
105 Group: Development/Libraries
106 Requires: %{name} = %{version}-%{release}
109 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
110 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
113 Summary: Bluetooth Service daemon
114 Group: Network & Connectivity/Bluetooth
115 Requires: %{name} = %{version}-%{release}
118 This package is Bluetooth Service daemon to manage BT services.
121 Summary: Bluetooth HTTP Proxy Service daemon
123 Requires: %{name} = %{version}-%{release}
125 %description httpproxy
126 This package is Bluetooth HTTP Proxy Service daemon
129 Summary: Bluetooth Core daemon
130 Group: Network & Connectivity/Bluetooth
131 Requires: %{name} = %{version}-%{release}
134 This package is Bluetooth core daemon to manage activation / deactivation.
137 Summary: Bluetooth test application
138 Group: Network & Connectivity/Bluetooth
139 Requires: %{name} = %{version}-%{release}
142 This package is Bluetooth test application.
150 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
151 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
152 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
155 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
157 export CFLAGS="$CFLAGS -fpie"
158 export LDFLAGS="$CFLAGS -pie"
161 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
162 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
164 %if "%{?_with_emulator}" == "1"
165 export CFLAGS="$CFLAGS -DTIZEN_TEST_EMUL"
166 export CXXFLAGS="$CXXFLAGS -DTIZEN_TEST_EMUL"
167 export FFLAGS="$FFLAGS -DTIZEN_TEST_EMUL"
171 %if "%{?tizen_target_name}" == "TM1"
172 export CFLAGS="${CFLAGS} -DTIZEN_FEATURE_RADIO"
173 export CXXFLAGS="$CXXFLAGS -DTIZEN_FEATURE_RADIO"
174 export FFLAGS="$FFLAGS -DTIZEN_FEATURE_RADIO"
179 export CFLAGS+=" -DARCH64"
180 export CXXFLAGS+=" -DARCH64"
181 export FFLAGS+=" -DARCH64"
184 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
185 -DCMAKE_LIB_DIR=%{_libdir} \
186 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
187 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
188 -DLIBNOTIFY_SUPPORT=Off \
189 -DLIBNOTIFICATION_SUPPORT=Off
198 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
199 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
200 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy
201 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
203 mkdir -p %{buildroot}%{_unitdir}/starter.target.wants
204 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
206 # Rename the postfix (.mobile, .tv, ..) at post script
208 %if "%{?tizen_target_name}" == "TM1"
209 install -m 0644 packaging/bluetooth-frwk-mobile-sprd.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
211 install -m 0644 packaging/bluetooth-frwk-mobile.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.mobile
215 install -m 0644 packaging/bluetooth-frwk-wearable.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.wearable
216 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
217 cp %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
218 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
221 install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.tv
224 install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
226 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
227 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
229 %postun -p /sbin/ldconfig
232 %manifest %{name}.manifest
233 %defattr(-, root, root)
234 %{_libdir}/libbluetooth-api.so.*
235 %{_datadir}/license/bluetooth-frwk
238 %defattr(-, root, root)
239 %{_includedir}/bt-service/bluetooth-api.h
240 %{_includedir}/bt-service/bluetooth-hid-api.h
241 %{_includedir}/bt-service/bluetooth-audio-api.h
242 %{_includedir}/bt-service/bluetooth-telephony-api.h
243 %{_includedir}/bt-service/bluetooth-media-control.h
244 %{_includedir}/bt-service/bluetooth-scmst-api.h
245 %{_includedir}/bt-service/bluetooth-ipsp-api.h
246 %{_libdir}/pkgconfig/bluetooth-api.pc
247 %{_libdir}/libbluetooth-api.so
248 %{_datadir}/license/bluetooth-frwk-devel
251 %manifest %{name}.manifest
252 %defattr(-, root, root)
253 %{_bindir}/bt-service
254 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
255 %{_bindir}/bluetooth-frwk-test
256 %{_varlibdir}/bluetooth
257 %{_prefix}/etc/bluetooth
258 %{_datadir}/license/bluetooth-frwk-service
261 %manifest %{name}.manifest
262 %defattr(-, root, root)
263 %{_bindir}/bt-httpproxy
264 %{_datadir}/license/bluetooth-frwk-httpproxy
265 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
266 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
269 %manifest %{name}.manifest
270 %defattr(-, root, root)
271 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
273 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
276 %manifest %{name}.manifest
277 %defattr(-, root, root)
278 %{_bindir}/bluetooth-frwk-test
279 #{_bindir}/bluetooth-gatt-test
280 #{_bindir}/bluetooth-advertising-test
284 mv bluetooth-frwk.service.common bluetooth-frwk.service
286 %preun profile_common
288 mv bluetooth-frwk.service bluetooth-frwk.service.common
290 %files profile_common
291 %{_unitdir}/starter.target.wants/bluetooth-frwk.service
292 %{_unitdir}/bluetooth-frwk.service.common
293 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
297 mv bluetooth-frwk.service.mobile bluetooth-frwk.service
299 %preun profile_mobile
301 mv bluetooth-frwk.service bluetooth-frwk.service.mobile
303 %files profile_mobile
304 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
305 %{_unitdir}/bluetooth-frwk.service.mobile
306 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
308 %post profile_wearable
310 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
312 %preun profile_wearable
314 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
316 %files profile_wearable
317 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
318 %{_unitdir}/bluetooth-frwk.service.wearable
319 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
323 mv bluetooth-frwk.service.tv bluetooth-frwk.service
327 mv bluetooth-frwk.service bluetooth-frwk.service.tv
330 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
331 %{_unitdir}/bluetooth-frwk.service.tv
332 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
334 # Note: ivi reuses bluetooth-frwk.service.wearable
337 mv bluetooth-frwk.service.wearable bluetooth-frwk.service
339 pushd %{_datadir}/dbus-1/system-services
340 mv org.projectx.bt.service.ivi org.projectx.bt.service
344 mv bluetooth-frwk.service bluetooth-frwk.service.wearable
346 pushd %{_datadir}/dbus-1/system-services
347 mv org.projectx.bt.service org.projectx.bt.service.ivi
350 %{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
351 %{_unitdir}/bluetooth-frwk.service.wearable
352 %{_datadir}/dbus-1/system-services/org.projectx.bt.service.ivi
354 ### added /usr/etc/bluetooth/wearable/stack_info (others: /usr/etc/bluetooth/stack_info))
355 # (for PROFILE WEARABLE)