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
13 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
14 Source1002: bt-icon.png
20 %if "%{?profile}" != "mobile"
21 Requires: bluetooth-tools
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 %if %{with bluetooth_frwk_libnotify}
30 BuildRequires: pkgconfig(libnotify)
31 BuildRequires: pkgconfig(gdk-pixbuf-2.0)
32 BuildRequires: pkgconfig(gtk+-3.0)
33 %elif %{without bluetooth_frwk_libnotification}
34 BuildRequires: pkgconfig(syspopup-caller)
37 BuildRequires: pkgconfig(syspopup-caller)
39 BuildRequires: pkgconfig(vconf)
40 BuildRequires: pkgconfig(libxml-2.0)
41 BuildRequires: pkgconfig(dbus-1)
43 BuildRequires: pkgconfig(utilX)
45 BuildRequires: pkgconfig(capi-network-connection)
46 BuildRequires: pkgconfig(alarm-service)
47 BuildRequires: pkgconfig(security-server)
48 BuildRequires: pkgconfig(capi-content-mime-type)
49 BuildRequires: pkgconfig(appcore-efl)
50 BuildRequires: pkgconfig(pkgmgr)
51 #BuildRequires: pkgconfig(journal)
52 #BuildRequires: pkgconfig(eventsystem)
53 %if "%{?tizen_profile_name}" == "mobile"
54 BuildRequires: pkgconfig(capi-network-tethering)
56 #BuildRequires: pkgconfig(cynara-client)
57 #BuildRequires: pkgconfig(cynara-creds-dbus)
62 Requires(postun): eglibc
66 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
67 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
71 Summary: Bluetooth framework for BlueZ and Obexd
72 Group: Development/Libraries
73 Requires: %{name} = %{version}-%{release}
76 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
77 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
80 Summary: Bluetooth Service daemon
81 Group: Network & Connectivity/Bluetooth
82 Requires: %{name} = %{version}-%{release}
85 This package is Bluetooth Service daemon to manage BT services.
88 Summary: Bluetooth Core daemon
89 Group: Network & Connectivity/Bluetooth
90 Requires: %{name} = %{version}-%{release}
93 This package is Bluetooth core daemon to manage activation / deactivation.
96 Summary: Bluetooth test application
97 Group: Network & Connectivity/Bluetooth
98 Requires: %{name} = %{version}-%{release}
101 This package is Bluetooth test application.
108 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
109 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
110 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
112 export CFLAGS="$CFLAGS -fpie -DRFCOMM_DIRECT "
113 export LDFLAGS="$CFLAGS -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
115 %if "%{?tizen_profile_name}" == "mobile"
116 export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE -DTIZEN_BT_FLIGHTMODE_ENABLED"
119 %if "%{?tizen_profile_name}" == "wearable"
120 export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
121 %define _servicefile packaging/bluetooth-frwk-wearable.service
122 %define _servicedir multi-user.target.wants
124 %define _servicefile packaging/bluetooth-frwk-mobile.service
125 %define _servicedir graphical.target.wants
127 %define _servicedir multi-user.target.wants
130 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
134 export CFLAGS="$CFLAGS -D__TIZEN_MOBILE__ -DTIZEN_TELEPHONY_ENABLED"
138 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
139 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
140 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
141 %if %{with bluetooth_frwk_libnotify}
142 -DLIBNOTIFY_SUPPORT=On \
144 -DLIBNOTIFY_SUPPORT=Off \
146 %if %{with bluetooth_frwk_libnotification}
147 -DLIBNOTIFICATION_SUPPORT=On
149 -DLIBNOTIFICATION_SUPPORT=Off
155 %if "%{?tizen_profile_name}" == "wearable"
156 -DTIZEN_WEARABLE=YES \
158 -DTIZEN_WEARABLE=NO \
160 %if "%{?tizen_profile_name}" == "common"
161 -DTIZEN_WEARABLE=NO \
169 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
170 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
171 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
173 mkdir -p %{buildroot}%{_unitdir_user}
174 install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}
176 mkdir -p %{buildroot}%{_dumpdir}
177 install -m 0755 bluetooth_log_dump.sh %{buildroot}%{_dumpdir}
179 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
180 mkdir -p %{buildroot}%{_datadir}/icons/default
181 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
184 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
185 %if "%{profile}"=="ivi"
186 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
192 %if "%{?tizen_profile_name}" == "wearable"
193 vconftool set -f -t int db/bluetooth/status "1" -g 6520
195 %if "%{?tizen_profile_name}" == "mobile"
196 vconftool set -f -t int db/bluetooth/status "0" -g 6520
198 %if "%{?tizen_profile_name}" == "common"
199 vconftool set -f -t int db/bluetooth/status "0" -g 6520
202 vconftool set -f -t int db/bluetooth/status "0" -s User
203 vconftool set -f -t int db/bluetooth/lestatus "0" -s User
204 vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
205 vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
206 vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
207 vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
208 vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
209 vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
210 vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
214 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
215 #ln -sf %{_libdir}/systemd/system/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
217 %postun -p /sbin/ldconfig
220 %defattr(-, root, root)
221 %{_libdir}/libbluetooth-api.so.*
222 %{_datadir}/license/bluetooth-frwk
223 #%{_libdir}/systemd/system/%{_servicedir}/bluetooth-frwk.service
224 #%{_libdir}/systemd/system/bluetooth-frwk.service
227 %defattr(-, root, root)
228 %{_includedir}/bt-service/bluetooth-api.h
229 %{_includedir}/bt-service/bluetooth-hid-api.h
230 %{_includedir}/bt-service/bluetooth-audio-api.h
231 %{_includedir}/bt-service/bluetooth-telephony-api.h
232 %{_includedir}/bt-service/bluetooth-media-control.h
233 %{_includedir}/bt-service/bluetooth-scmst-api.h
234 %{_libdir}/pkgconfig/bluetooth-api.pc
235 %{_libdir}/libbluetooth-api.so
236 %{_datadir}/license/bluetooth-frwk-devel
239 %manifest bluetooth-frwk.manifest
240 %defattr(-, root, root)
241 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
242 %{_bindir}/bt-service
243 %{_unitdir_user}/bluetooth-frwk-service.service
244 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
245 %{_bindir}/bluetooth-frwk-test
246 #%{_bindir}/bluetooth-gatt-test
247 #%{_bindir}/bluetooth-advertising-test
248 %{_varlibdir}/bluetooth
249 %{_prefix}/etc/bluetooth
250 #%attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
251 #%attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
252 %{_dumpdir}/bluetooth_log_dump.sh
253 %{_datadir}/license/bluetooth-frwk-service
254 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
255 %{_datadir}/icons/default/bt-icon.png
259 %manifest bluetooth-frwk-core.manifest
260 %defattr(-, root, root)
261 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
265 %manifest bluetooth-frwk-test.manifest
266 %defattr(-, root, root)
267 %{_bindir}/bluetooth-frwk-test
268 %{_bindir}/bluetooth-gatt-test
269 %{_bindir}/bluetooth-advertising-test