2 %define _dumpdir /opt/etc/dump.d/module.d
3 %define _varlibdir /opt/var/lib
6 Summary: Bluetooth framework for BlueZ and Obexd.
9 Group: Network & Connectivity/Bluetooth
11 Source0: %{name}-%{version}.tar.gz
12 Source1001: bluetooth-frwk.manifest
16 %if "%{?profile}" != "mobile"
17 Requires: bluetooth-tools
20 %define bt_hal ENABLED
21 %define bt_bluez_hal ENABLED
23 BuildRequires: pkgconfig(aul)
24 BuildRequires: pkgconfig(dbus-glib-1)
25 BuildRequires: pkgconfig(dlog)
26 BuildRequires: pkgconfig(glib-2.0)
27 BuildRequires: pkgconfig(gio-2.0)
28 BuildRequires: pkgconfig(gio-unix-2.0)
29 BuildRequires: pkgconfig(syspopup-caller)
30 BuildRequires: pkgconfig(vconf)
31 BuildRequires: pkgconfig(libxml-2.0)
32 BuildRequires: pkgconfig(dbus-1)
33 BuildRequires: pkgconfig(capi-network-connection)
34 BuildRequires: pkgconfig(alarm-service)
35 BuildRequires: pkgconfig(capi-content-mime-type)
36 BuildRequires: pkgconfig(appcore-efl)
37 BuildRequires: pkgconfig(pkgmgr)
38 #BuildRequires: pkgconfig(journal)
39 BuildRequires: pkgconfig(eventsystem)
40 BuildRequires: pkgconfig(libsoup-2.4)
41 %if "%{?profile}" == "mobile"
42 BuildRequires: pkgconfig(capi-network-tethering)
45 BuildRequires: pkgconfig(cynara-client)
46 BuildRequires: pkgconfig(cynara-creds-gdbus)
47 BuildRequires: pkgconfig(libtzplatform-config)
48 BuildRequires: pkgconfig(storage)
50 Requires(post): /usr/bin/vconftool
51 Requires(post): /sbin/ldconfig
52 Requires(postun): /sbin/ldconfig
56 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
57 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
61 Summary: Bluetooth framework for BlueZ and Obexd
62 Group: Development/Libraries
63 Requires: %{name} = %{version}-%{release}
66 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
67 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
70 Summary: Bluetooth Service daemon
71 Group: Network & Connectivity/Bluetooth
72 Requires: %{name} = %{version}-%{release}
75 This package is Bluetooth Service daemon to manage BT services.
78 Summary: Bluetooth HTTP Proxy Service daemon
79 Group: Network & Connectivity/Bluetooth
80 Requires: %{name} = %{version}-%{release}
82 %description httpproxy
83 This package is Bluetooth HTTP Proxy Service daemon
86 Summary: Bluetooth Core daemon
87 Group: Network & Connectivity/Bluetooth
88 Requires: %{name} = %{version}-%{release}
91 This package is Bluetooth core daemon to manage activation / deactivation.
94 Summary: Bluetooth test application
95 Group: Network & Connectivity/Bluetooth
96 Requires: %{name} = %{version}-%{release}
99 This package is Bluetooth test application.
101 %if %{bt_hal} == ENABLED
103 Summary: Bluetooth OAL
104 Group: Network & Connectivity/Bluetooth
105 Requires: %{name} = %{version}-%{release}
108 This package is BT stack common interface.
117 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
118 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
119 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
121 %define _servicefile packaging/bluetooth-frwk-common.service
122 %define _servicedir starter.target.wants
124 %if "%{?profile}" == "mobile"
125 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_NETWORK_TETHERING_ENABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED -DTIZEN_PROFILE_MOBILE -DTIZEN_FEATURE_TELEPHONY_ENABLED"
126 %if "%{?tizen_target_name}" == "TM1"
127 %define _servicefile packaging/bluetooth-frwk-mobile-sprd.service
129 %define _servicefile packaging/bluetooth-frwk-mobile.service
131 %define _servicedir multi-user.target.wants
134 %if "%{?profile}" == "wearable"
135 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_WEARABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED"
136 %define _servicefile packaging/bluetooth-frwk-wearable.service
137 %define _servicedir multi-user.target.wants
140 %if "%{?profile}" == "tv"
141 export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV -DAUTO_ACCEPT"
142 %define _servicefile packaging/bluetooth-frwk-tv.service
143 %define _servicedir multi-user.target.wants
146 %if "%{?profile}" == "ivi"
147 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI"
148 %define _servicefile packaging/bluetooth-frwk-wearable.service
149 %define _servicedir multi-user.target.wants
153 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
155 export CFLAGS="$CFLAGS -fpie"
156 export LDFLAGS="$CFLAGS -pie"
159 %if %{bt_hal} == ENABLED
160 export CFLAGS="$CFLAGS -URFCOMM_DIRECT -DTIZEN_BT_HAL"
162 export CFLAGS="$CFLAGS -DRFCOMM_DIRECT"
164 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
166 %if "%{?_with_emulator}" == "1"
167 export CFLAGS="$CFLAGS -DTIZEN_TEST_EMUL"
168 export CXXFLAGS="$CXXFLAGS -DTIZEN_TEST_EMUL"
169 export FFLAGS="$FFLAGS -DTIZEN_TEST_EMUL"
172 %if "%{?tizen_target_name}" == "TM1"
173 export CFLAGS="${CFLAGS} -DTIZEN_FEATURE_RADIO"
174 export CXXFLAGS="$CXXFLAGS -DTIZEN_FEATURE_RADIO"
175 export FFLAGS="$FFLAGS -DTIZEN_FEATURE_RADIO"
178 %if %{bt_hal} == ENABLED
179 export BT_INCLUDE_OAL=ENABLED
180 %if %{bt_bluez_hal} == ENABLED
181 export BT_INCLUDE_OAL_BLUEZ=ENABLED
182 export CFLAGS="$CFLAGS -DTIZEN_BT_INCLUDE_OAL_BLUEZ"
183 #export CFLAGS="$CFLAGS -DTIZEN_SYSPOPUP_SUPPORTED"
185 export BT_INCLUDE_OAL_BLUEZ=DISABLED
188 export BT_INCLUDE_OAL=DISABLED
191 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
192 -DCMAKE_LIB_DIR=%{_libdir} \
193 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
194 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
195 -DLIBNOTIFY_SUPPORT=Off \
196 -DLIBNOTIFICATION_SUPPORT=Off
200 %if "%{?profile}" == "wearable"
201 -DTIZEN_PROFILE_WEARABLE=YES \
203 -DTIZEN_PROFILE_WEARABLE=NO \
205 %if "%{?profile}" == "common"
206 -DTIZEN_PROFILE_WEARABLE=NO \
213 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
214 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
215 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy
216 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
218 #mkdir -p %{buildroot}%{_libdir}/systemd/user
219 #install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_libdir}/systemd/user
220 mkdir -p %{buildroot}%{_unitdir}/%{_servicedir}
221 install -m 0644 %{_servicefile} %{buildroot}%{_unitdir}/bluetooth-frwk.service
222 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/%{_servicedir}/bluetooth-frwk.service
224 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
225 %if "%{profile}"=="ivi"
226 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
232 #%if "%{?profile}" == "wearable"
233 #vconftool set -f -t int db/bluetooth/status "1" -g 6520
235 #%if "%{?profile}" == "mobile"
236 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
238 #%if "%{?profile}" == "common"
239 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
242 #vconftool set -f -t int db/bluetooth/status "0" -s User
243 #vconftool set -f -t int db/bluetooth/lestatus "0" -s User
244 #vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
245 #vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
246 #vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
247 #vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
248 #vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
249 #vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
250 #vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
254 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
255 #ln -sf %{_libdir}/systemd/user/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
257 %postun -p /sbin/ldconfig
260 %manifest %{name}.manifest
261 %defattr(-, root, root)
262 %{_libdir}/libbluetooth-api.so.*
263 %{_datadir}/license/bluetooth-frwk
264 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
265 %{_unitdir}/bluetooth-frwk.service
268 %defattr(-, root, root)
269 %{_includedir}/bt-service/bluetooth-api.h
270 %{_includedir}/bt-service/bluetooth-hid-api.h
271 %{_includedir}/bt-service/bluetooth-audio-api.h
272 %{_includedir}/bt-service/bluetooth-telephony-api.h
273 %{_includedir}/bt-service/bluetooth-media-control.h
274 %{_includedir}/bt-service/bluetooth-scmst-api.h
275 %{_includedir}/bt-service/bluetooth-ipsp-api.h
276 %{_libdir}/pkgconfig/bluetooth-api.pc
277 %{_libdir}/libbluetooth-api.so
278 %{_datadir}/license/bluetooth-frwk-devel
281 %manifest %{name}.manifest
282 %defattr(-, root, root)
283 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
284 %{_bindir}/bt-service
285 #%{_libdir}/systemd/user/bluetooth-frwk-tv.service
286 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
287 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
288 %{_bindir}/bluetooth-frwk-test
289 #%{_bindir}/bluetooth-gatt-test
290 #%{_bindir}/bluetooth-advertising-test
291 %{_varlibdir}/bluetooth
292 %{_prefix}/etc/bluetooth
293 #%attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
294 #%attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
295 #%{_dumpdir}/bluetooth_log_dump.sh
296 %{_datadir}/license/bluetooth-frwk-service
299 %manifest %{name}.manifest
300 %defattr(-, root, root)
301 %{_bindir}/bt-httpproxy
302 %{_datadir}/license/bluetooth-frwk-httpproxy
303 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
304 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
307 %manifest %{name}.manifest
308 %defattr(-, root, root)
309 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
311 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
314 %manifest %{name}.manifest
315 %defattr(-, root, root)
316 %{_bindir}/bluetooth-frwk-test
317 %{_bindir}/bluetooth-gatt-test
318 %{_bindir}/bluetooth-advertising-test
320 %if %{bt_hal} == ENABLED
322 %manifest %{name}.manifest
323 %{_libdir}/libbt-oal.so*
324 %{_libdir}/libbluetooth.default.so*