1 %define _dumpdir /opt/etc/dump.d/module.d
2 %define _varlibdir /opt/var/lib
3 #%bcond_with bluetooth_frwk_libnotify
4 #%bcond_with bluetooth_frwk_libnotification
8 Summary: Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
11 Group: Network & Connectivity/Bluetooth
12 License: Apache License, Version 2.0
13 Source0: %{name}-%{version}.tar.gz
14 Source1001: bluetooth-frwk.manifest
15 Source1002: bt-icon.png
16 URL: https://review.tizen.org/git/?p=platform/core/connectivity/bluetooth-frwk.git;a=summary
19 Requires: bluetooth-tools
20 BuildRequires: pkgconfig(aul)
21 BuildRequires: pkgconfig(dbus-glib-1)
22 BuildRequires: pkgconfig(dlog)
23 BuildRequires: pkgconfig(glib-2.0)
24 BuildRequires: pkgconfig(gio-2.0)
25 BuildRequires: pkgconfig(gio-unix-2.0)
26 %if %{with bluetooth_frwk_libnotify}
27 BuildRequires: pkgconfig(libnotify)
28 BuildRequires: pkgconfig(gdk-pixbuf-2.0)
29 BuildRequires: pkgconfig(gtk+-3.0)
30 %elif %{without bluetooth_frwk_libnotification}
31 BuildRequires: pkgconfig(syspopup-caller)
34 BuildRequires: pkgconfig(syspopup-caller)
36 BuildRequires: pkgconfig(vconf)
37 BuildRequires: pkgconfig(libxml-2.0)
38 BuildRequires: pkgconfig(dbus-1)
40 BuildRequires: pkgconfig(utilX)
42 BuildRequires: pkgconfig(capi-network-connection)
44 BuildRequires: pkgconfig(libprivilege-control)
45 BuildRequires: pkgconfig(status)
46 BuildRequires: pkgconfig(alarm-service)
47 BuildRequires: pkgconfig(notification)
48 BuildRequires: pkgconfig(security-server)
49 BuildRequires: pkgconfig(capi-content-mime-type)
50 BuildRequires: pkgconfig(appcore-efl)
51 BuildRequires: pkgconfig(pkgmgr)
52 #BuildRequires: pkgconfig(journal)
54 %if "%{?tizen_profile_name}" == "mobile"
55 BuildRequires: pkgconfig(capi-network-tethering)
59 BuildRequires: pkgconfig(libtzplatform-config)
61 Requires(post): /usr/bin/vconftool
62 Requires(post): /sbin/ldconfig
63 Requires(postun): /sbin/ldconfig
67 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
68 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
72 Summary: Bluetooth framework for BlueZ and Obexd
73 Group: Development/Libraries
74 Requires: %{name} = %{version}-%{release}
77 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
78 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
81 Summary: Bluetooth Service daemon
82 Group: Network & Connectivity/Bluetooth
83 Requires: %{name} = %{version}-%{release}
86 This package is Bluetooth Service daemon to manage BT services.
89 Summary: Bluetooth Core daemon
90 Group: Network & Connectivity/Bluetooth
91 Requires: %{name} = %{version}-%{release}
95 This package is Bluetooth core daemon to manage activation / deactivation.
98 Summary: Bluetooth test application
99 Group: Network & Connectivity/Bluetooth
100 Requires: %{name} = %{version}-%{release}
103 This package is Bluetooth test application.
111 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
112 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
113 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
115 %if "%{?tizen_profile_name}" == "mobile"
116 export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE"
119 %if "%{?tizen_profile_name}" == "wearable"
120 export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
121 %define _servicefile packaging/bluetooth-frwk-wearable.service
123 %define _servicefile packaging/bluetooth-frwk-mobile.service
125 %define _servicedir multi-user.target.wants
127 %if "%{?tizen_profile_name}" == "mobile"
129 export CFLAGS="$CFLAGS -DTIZEN_TELEPHONY_ENABLED"
133 export CFLAGS+=" -Wall -g -fvisibility=hidden -fPIC -DRFCOMM_DIRECT "
134 export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
136 export CFLAGS+=" -fpie -DRFCOMM_DIRECT "
137 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
141 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
142 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
143 %if %{with bluetooth_frwk_libnotify}
144 -DLIBNOTIFY_SUPPORT=On \
146 -DLIBNOTIFY_SUPPORT=Off \
148 %if %{with bluetooth_frwk_libnotification}
149 -DLIBNOTIFICATION_SUPPORT=On
151 -DLIBNOTIFICATION_SUPPORT=Off
155 %if "%{?tizen_profile_name}" == "wearable"
156 -DTIZEN_WEARABLE=YES \
158 -DTIZEN_WEARABLE=NO \
167 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
168 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
169 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
171 mkdir -p %{buildroot}%{_unitdir_user}
172 install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}
174 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
175 mkdir -p %{buildroot}%{_datadir}/icons/default
176 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
179 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
180 %if "%{profile}"=="ivi"
181 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
184 mkdir -p %{buildroot}%{_dumpdir}
185 install -m 0755 bluetooth_log_dump.sh %{buildroot}%{_dumpdir}
189 %if "%{?tizen_profile_name}" == "wearable"
190 vconftool set -f -t int db/bluetooth/status "1" -g 6520
192 vconftool set -f -t int db/bluetooth/status "0" -g 6520
195 vconftool set -f -t int db/bluetooth/lestatus "0" -g 6520 -i
196 vconftool set -f -t int file/private/bt-service/flight_mode_deactivated "0" -g 6520 -i
197 vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -g 6520 -i
198 vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -g 6520 -i
199 vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -g 6520 -i
200 vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
201 vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
202 vconftool set -f -t int memory/bluetooth/btsco "0" -g 6520 -i
203 vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
204 # set 'User' smack label to vconf keys in order to allow bt-service to access them.
205 chsmack -a 'User' %TZ_SYS_CONFIG/db/bluetooth/status
206 chsmack -a 'User' %TZ_SYS_CONFIG/file/private/bt-service/flight_mode_deactivated
207 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/sco_headset_name
208 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/device
209 chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/btsco
212 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
213 ln -sf %{_libdir}/systemd/system/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
215 %postun -p /sbin/ldconfig
218 %manifest %{name}.manifest
219 %defattr(-, root, root)
220 %{_libdir}/libbluetooth-api.so.*
221 %{_datadir}/license/bluetooth-frwk
224 %defattr(-, root, root)
225 %{_includedir}/bt-service/bluetooth-api.h
226 %{_includedir}/bt-service/bluetooth-hid-api.h
227 %{_includedir}/bt-service/bluetooth-audio-api.h
228 %{_includedir}/bt-service/bluetooth-telephony-api.h
229 %{_includedir}/bt-service/bluetooth-media-control.h
230 %{_includedir}/bt-service/bluetooth-scmst-api.h
231 %{_libdir}/pkgconfig/bluetooth-api.pc
232 %{_libdir}/libbluetooth-api.so
233 %{_datadir}/license/bluetooth-frwk-devel
236 %manifest %{name}.manifest
237 %defattr(-, root, root)
238 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
239 %{_bindir}/bt-service
240 %{_unitdir_user}/bluetooth-frwk-service.service
241 %{_bindir}/bluetooth-frwk-test
242 %{_bindir}/bluetooth-gatt-test
243 %{_bindir}/bluetooth-advertising-test
244 %{_varlibdir}/bluetooth
245 %{_prefix}/etc/bluetooth
246 #%attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
247 #%{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
248 #%attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
249 %{_dumpdir}/bluetooth_log_dump.sh
250 %{_datadir}/license/bluetooth-frwk-service
251 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
252 %{_datadir}/icons/default/bt-icon.png
256 %manifest %{name}.manifest
257 %defattr(-, root, root)
258 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
260 #%{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
263 %manifest %{name}.manifest
264 %defattr(-, root, root)
265 %{_bindir}/bluetooth-frwk-test
266 %{_bindir}/bluetooth-gatt-test
267 %{_bindir}/bluetooth-advertising-test