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
13 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
14 Source1002: bt-icon.png
19 %if "%{?profile}" != "mobile"
20 Requires: bluetooth-tools
23 %define bt_hal ENABLED
24 %define bt_bluez_hal ENABLED
26 BuildRequires: pkgconfig(aul)
27 BuildRequires: pkgconfig(dbus-glib-1)
28 BuildRequires: pkgconfig(dlog)
29 BuildRequires: pkgconfig(glib-2.0)
30 BuildRequires: pkgconfig(gio-2.0)
31 BuildRequires: pkgconfig(gio-unix-2.0)
32 %if %{with bluetooth_frwk_libnotify}
33 BuildRequires: pkgconfig(libnotify)
34 BuildRequires: pkgconfig(gdk-pixbuf-2.0)
35 BuildRequires: pkgconfig(gtk+-3.0)
36 %elif %{without bluetooth_frwk_libnotification}
37 BuildRequires: pkgconfig(syspopup-caller)
40 BuildRequires: pkgconfig(syspopup-caller)
42 BuildRequires: pkgconfig(vconf)
43 BuildRequires: pkgconfig(libxml-2.0)
44 BuildRequires: pkgconfig(dbus-1)
46 BuildRequires: pkgconfig(utilX)
48 BuildRequires: pkgconfig(capi-network-connection)
49 BuildRequires: pkgconfig(alarm-service)
50 BuildRequires: pkgconfig(capi-content-mime-type)
51 BuildRequires: pkgconfig(appcore-efl)
52 BuildRequires: pkgconfig(pkgmgr)
53 #BuildRequires: pkgconfig(journal)
54 BuildRequires: pkgconfig(eventsystem)
55 BuildRequires: pkgconfig(libsoup-2.4)
56 %if "%{?profile}" == "mobile"
57 BuildRequires: pkgconfig(capi-network-tethering)
60 BuildRequires: pkgconfig(cynara-client)
61 BuildRequires: pkgconfig(cynara-creds-gdbus)
62 BuildRequires: pkgconfig(libtzplatform-config)
63 BuildRequires: pkgconfig(storage)
65 Requires(post): /usr/bin/vconftool
66 Requires(post): /sbin/ldconfig
67 Requires(postun): /sbin/ldconfig
71 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
72 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
76 Summary: Bluetooth framework for BlueZ and Obexd
77 Group: Development/Libraries
78 Requires: %{name} = %{version}-%{release}
81 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
82 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
85 Summary: Bluetooth Service daemon
86 Group: Network & Connectivity/Bluetooth
87 Requires: %{name} = %{version}-%{release}
90 This package is Bluetooth Service daemon to manage BT services.
93 Summary: Bluetooth HTTP Proxy Service daemon
94 Group: Network & Connectivity/Bluetooth
95 Requires: %{name} = %{version}-%{release}
97 %description httpproxy
98 This package is Bluetooth HTTP Proxy Service daemon
101 Summary: Bluetooth Core daemon
102 Group: Network & Connectivity/Bluetooth
103 Requires: %{name} = %{version}-%{release}
106 This package is Bluetooth core daemon to manage activation / deactivation.
109 Summary: Bluetooth test application
110 Group: Network & Connectivity/Bluetooth
111 Requires: %{name} = %{version}-%{release}
114 This package is Bluetooth test application.
116 %if %{bt_hal} == ENABLED
118 Summary: Bluetooth OAL
119 Group: Network & Connectivity/Bluetooth
120 Requires: %{name} = %{version}-%{release}
123 This package is BT stack common interface.
132 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
133 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
134 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
136 %define _servicefile packaging/bluetooth-frwk-common.service
137 %define _servicedir starter.target.wants
139 %if "%{?profile}" == "mobile"
140 export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE -DTIZEN_BT_FLIGHTMODE_ENABLED -DTIZEN_MOBILE -DTIZEN_TELEPHONY_ENABLED"
141 %if "%{?tizen_target_name}" == "TM1"
142 %define _servicefile packaging/bluetooth-frwk-mobile-sprd.service
144 %define _servicefile packaging/bluetooth-frwk-mobile.service
146 %define _servicedir multi-user.target.wants
149 %if "%{?profile}" == "wearable"
150 export CFLAGS="$CFLAGS -DTIZEN_WEARABLE -DTIZEN_BT_FLIGHTMODE_ENABLED"
151 %define _servicefile packaging/bluetooth-frwk-wearable.service
152 %define _servicedir multi-user.target.wants
155 %if "%{?profile}" == "tv"
156 export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV -DAUTO_ACCEPT"
157 %define _servicefile packaging/bluetooth-frwk-mobile.service
158 %define _servicedir multi-user.target.wants
162 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
164 export CFLAGS="$CFLAGS -fpie"
165 export LDFLAGS="$CFLAGS -pie"
168 %if %{bt_hal} == ENABLED
169 export CFLAGS="$CFLAGS -URFCOMM_DIRECT -DTIZEN_BT_HAL"
171 export CFLAGS="$CFLAGS -DRFCOMM_DIRECT"
173 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
175 %if "%{?_with_emulator}" == "1"
176 export CFLAGS="$CFLAGS -DEMUL"
177 export CXXFLAGS="$CXXFLAGS -DEMUL"
178 export FFLAGS="$FFLAGS -DEMUL"
181 %if %{bt_hal} == ENABLED
182 export BT_INCLUDE_OAL=ENABLED
183 %if %{bt_bluez_hal} == ENABLED
184 export BT_INCLUDE_OAL_BLUEZ=ENABLED
185 export CFLAGS="$CFLAGS -DTIZEN_BT_INCLUDE_OAL_BLUEZ"
186 export CFLAGS="$CFLAGS -DTIZEN_SYSPOPUP_SUPPORTED"
188 export BT_INCLUDE_OAL_BLUEZ=DISABLED
191 export BT_INCLUDE_OAL=DISABLED
194 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
195 -DCMAKE_LIB_DIR=%{_libdir} \
196 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
197 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
198 %if %{with bluetooth_frwk_libnotify}
199 -DLIBNOTIFY_SUPPORT=On \
201 -DLIBNOTIFY_SUPPORT=Off \
203 %if %{with bluetooth_frwk_libnotification}
204 -DLIBNOTIFICATION_SUPPORT=On
206 -DLIBNOTIFICATION_SUPPORT=Off
212 %if "%{?profile}" == "wearable"
213 -DTIZEN_WEARABLE=YES \
215 -DTIZEN_WEARABLE=NO \
217 %if "%{?profile}" == "common"
218 -DTIZEN_WEARABLE=NO \
225 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
226 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
227 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy
228 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
230 #mkdir -p %{buildroot}%{_libdir}/systemd/user
231 #install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_libdir}/systemd/user
232 mkdir -p %{buildroot}%{_unitdir}/%{_servicedir}
233 install -m 0644 %{_servicefile} %{buildroot}%{_unitdir}/bluetooth-frwk.service
234 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/%{_servicedir}/bluetooth-frwk.service
236 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
237 mkdir -p %{buildroot}%{_datadir}/icons/default
238 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
241 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
242 %if "%{profile}"=="ivi"
243 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
249 #%if "%{?profile}" == "wearable"
250 #vconftool set -f -t int db/bluetooth/status "1" -g 6520
252 #%if "%{?profile}" == "mobile"
253 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
255 #%if "%{?profile}" == "common"
256 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
259 #vconftool set -f -t int db/bluetooth/status "0" -s User
260 #vconftool set -f -t int db/bluetooth/lestatus "0" -s User
261 #vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
262 #vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
263 #vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
264 #vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
265 #vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
266 #vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
267 #vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
271 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
272 #ln -sf %{_libdir}/systemd/user/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
274 %postun -p /sbin/ldconfig
277 %manifest %{name}.manifest
278 %defattr(-, root, root)
279 %{_libdir}/libbluetooth-api.so.*
280 %{_datadir}/license/bluetooth-frwk
281 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
282 %{_unitdir}/bluetooth-frwk.service
285 %defattr(-, root, root)
286 %{_includedir}/bt-service/bluetooth-api.h
287 %{_includedir}/bt-service/bluetooth-hid-api.h
288 %{_includedir}/bt-service/bluetooth-audio-api.h
289 %{_includedir}/bt-service/bluetooth-telephony-api.h
290 %{_includedir}/bt-service/bluetooth-media-control.h
291 %{_includedir}/bt-service/bluetooth-scmst-api.h
292 %{_includedir}/bt-service/bluetooth-ipsp-api.h
293 %{_libdir}/pkgconfig/bluetooth-api.pc
294 %{_libdir}/libbluetooth-api.so
295 %{_datadir}/license/bluetooth-frwk-devel
298 %manifest %{name}.manifest
299 %defattr(-, root, root)
300 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
301 %{_bindir}/bt-service
302 #%{_libdir}/systemd/user/bluetooth-frwk-tv.service
303 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
304 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
305 %{_bindir}/bluetooth-frwk-test
306 #%{_bindir}/bluetooth-gatt-test
307 #%{_bindir}/bluetooth-advertising-test
308 %{_varlibdir}/bluetooth
309 %{_prefix}/etc/bluetooth
310 #%attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
311 #%attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
312 #%{_dumpdir}/bluetooth_log_dump.sh
315 %{_datadir}/license/bluetooth-frwk-service
316 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
317 %{_datadir}/icons/default/bt-icon.png
321 %manifest %{name}.manifest
322 %defattr(-, root, root)
323 %{_bindir}/bt-httpproxy
324 %{_datadir}/license/bluetooth-frwk-httpproxy
325 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
326 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
329 %manifest %{name}.manifest
330 %defattr(-, root, root)
331 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
333 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
336 %manifest %{name}.manifest
337 %defattr(-, root, root)
338 %{_bindir}/bluetooth-frwk-test
339 %{_bindir}/bluetooth-gatt-test
340 %{_bindir}/bluetooth-advertising-test
342 %if %{bt_hal} == ENABLED
344 %manifest %{name}.manifest
345 %{_libdir}/libbt-oal.so*
346 %{_libdir}/libbluetooth.default.so*