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 Source1002: bt-icon.png
14 URL: https://review.tizen.org/git/?p=platform/core/connectivity/bluetooth-frwk.git;a=summary
17 %if "%{?profile}" != "mobile"
18 Requires: bluetooth-tools
21 BuildRequires: pkgconfig(aul)
22 BuildRequires: pkgconfig(dbus-glib-1)
23 BuildRequires: pkgconfig(dlog)
24 BuildRequires: pkgconfig(glib-2.0)
25 BuildRequires: pkgconfig(gio-2.0)
26 BuildRequires: pkgconfig(gio-unix-2.0)
27 %if %{with bluetooth_frwk_libnotify}
28 BuildRequires: pkgconfig(libnotify)
29 BuildRequires: pkgconfig(gdk-pixbuf-2.0)
30 BuildRequires: pkgconfig(gtk+-3.0)
31 %elif %{without bluetooth_frwk_libnotification}
32 BuildRequires: pkgconfig(syspopup-caller)
35 BuildRequires: pkgconfig(syspopup-caller)
37 BuildRequires: pkgconfig(vconf)
38 BuildRequires: pkgconfig(libxml-2.0)
39 BuildRequires: pkgconfig(dbus-1)
41 BuildRequires: pkgconfig(utilX)
43 BuildRequires: pkgconfig(capi-network-connection)
45 BuildRequires: pkgconfig(libprivilege-control)
46 BuildRequires: pkgconfig(status)
47 BuildRequires: pkgconfig(alarm-service)
48 BuildRequires: pkgconfig(notification)
49 BuildRequires: pkgconfig(capi-content-mime-type)
50 BuildRequires: pkgconfig(appcore-efl)
51 BuildRequires: pkgconfig(pkgmgr)
52 #BuildRequires: pkgconfig(journal)
54 BuildRequires: pkgconfig(libtzplatform-config)
55 BuildRequires: pkgconfig(cynara-client)
56 BuildRequires: pkgconfig(cynara-creds-dbus)
58 Requires(post): /usr/bin/vconftool
59 Requires(post): /sbin/ldconfig
60 Requires(postun): /sbin/ldconfig
64 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
65 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
69 Summary: Bluetooth framework for BlueZ and Obexd
70 Group: Development/Libraries
71 Requires: %{name} = %{version}-%{release}
74 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
75 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
78 Summary: Bluetooth Service daemon
79 Group: Network & Connectivity/Bluetooth
80 Requires: %{name} = %{version}-%{release}
83 This package is Bluetooth Service daemon to manage BT services.
86 Summary: Bluetooth Core daemon
87 Group: Network & Connectivity/Bluetooth
88 Requires: %{name} = %{version}-%{release}
92 This package is Bluetooth core daemon to manage activation / deactivation.
95 Summary: Bluetooth test application
96 Group: Network & Connectivity/Bluetooth
97 Requires: %{name} = %{version}-%{release}
100 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"
113 export CFLAGS+=" -Wall -g -fvisibility=hidden -fPIC -DRFCOMM_DIRECT "
114 export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
116 export CFLAGS+=" -fpie -DRFCOMM_DIRECT "
117 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
121 export CFLAGS="${CFLAGS} -D__TIZEN_MOBILE__ -DTIZEN_TELEPHONY_ENABLED"
125 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
126 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
127 %if %{with bluetooth_frwk_libnotify}
128 -DLIBNOTIFY_SUPPORT=On \
130 -DLIBNOTIFY_SUPPORT=Off \
132 %if %{with bluetooth_frwk_libnotification}
133 -DLIBNOTIFICATION_SUPPORT=On
135 -DLIBNOTIFICATION_SUPPORT=Off
139 %if "%{?tizen_profile_name}" == "wearable"
140 -DTIZEN_WEARABLE=YES \
142 %if "%{?tizen_profile_name}" == "mobile"
143 -DTIZEN_WEARABLE=NO \
145 %if "%{?tizen_profile_name}" == "common"
146 -DTIZEN_WEARABLE=NO \
153 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
154 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
155 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
157 mkdir -p %{buildroot}%{_unitdir_user}
158 install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}
160 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
161 mkdir -p %{buildroot}%{_datadir}/icons/default
162 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
165 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
166 %if "%{profile}"=="ivi"
167 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
172 %if "%{?tizen_profile_name}" == "wearable"
173 vconftool set -f -t int db/bluetooth/status "1" -g 6520
175 %if "%{?tizen_profile_name}" == "mobile"
176 vconftool set -f -t int db/bluetooth/status "0" -g 6520
178 %if "%{?tizen_profile_name}" == "common"
179 vconftool set -f -t int db/bluetooth/status "0" -g 6520
183 vconftool set -f -t int db/bluetooth/status "0" -s User
184 vconftool set -f -t int db/bluetooth/lestatus "0" -s User
185 vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
186 vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
187 vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
188 vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
189 vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
190 vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
191 vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
194 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
195 #ln -sf %{_libdir}/systemd/system/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
197 %postun -p /sbin/ldconfig
200 %manifest %{name}.manifest
201 %defattr(-, root, root)
202 %{_libdir}/libbluetooth-api.so.*
203 %{_datadir}/license/bluetooth-frwk
206 %defattr(-, root, root)
207 %{_includedir}/bt-service/bluetooth-api.h
208 %{_includedir}/bt-service/bluetooth-hid-api.h
209 %{_includedir}/bt-service/bluetooth-audio-api.h
210 %{_includedir}/bt-service/bluetooth-telephony-api.h
211 %{_includedir}/bt-service/bluetooth-media-control.h
212 %{_includedir}/bt-service/bluetooth-scmst-api.h
213 %{_libdir}/pkgconfig/bluetooth-api.pc
214 %{_libdir}/libbluetooth-api.so
215 %{_datadir}/license/bluetooth-frwk-devel
218 %manifest %{name}.manifest
219 %defattr(-, root, root)
220 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
222 %{_bindir}/bt-service
223 %{_unitdir_user}/bluetooth-frwk-service.service
224 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
225 %{_bindir}/bluetooth-frwk-test
226 #%{_bindir}/bluetooth-gatt-test
227 #%{_bindir}/bluetooth-advertising-test
228 %{_varlibdir}/bluetooth
229 %{_prefix}/etc/bluetooth
230 %{_datadir}/license/bluetooth-frwk-service
231 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
232 %{_datadir}/icons/default/bt-icon.png
236 %manifest %{name}.manifest
237 %defattr(-, root, root)
238 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
240 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
243 %manifest %{name}.manifest
244 %defattr(-, root, root)
245 %{_bindir}/bluetooth-frwk-test
246 #%{_bindir}/bluetooth-gatt-test
247 #%{_bindir}/bluetooth-advertising-test