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
15 %if "%{?profile}" != "mobile"
16 Requires: bluetooth-tools
18 BuildRequires: pkgconfig(aul)
19 BuildRequires: pkgconfig(dlog)
20 BuildRequires: pkgconfig(glib-2.0)
21 BuildRequires: pkgconfig(gio-2.0)
22 BuildRequires: pkgconfig(gio-unix-2.0)
23 BuildRequires: pkgconfig(syspopup-caller)
24 BuildRequires: pkgconfig(vconf)
25 BuildRequires: pkgconfig(libxml-2.0)
26 BuildRequires: pkgconfig(capi-network-connection)
27 BuildRequires: pkgconfig(alarm-service)
28 BuildRequires: pkgconfig(capi-content-mime-type)
29 BuildRequires: pkgconfig(appcore-efl)
30 BuildRequires: pkgconfig(pkgmgr)
31 #BuildRequires: pkgconfig(journal)
32 BuildRequires: pkgconfig(eventsystem)
33 BuildRequires: pkgconfig(libsoup-2.4)
34 %if "%{?profile}" == "mobile"
35 BuildRequires: pkgconfig(capi-network-tethering)
38 BuildRequires: pkgconfig(cynara-client)
39 BuildRequires: pkgconfig(cynara-creds-gdbus)
40 BuildRequires: pkgconfig(libtzplatform-config)
41 BuildRequires: pkgconfig(storage)
43 Requires(post): /usr/bin/vconftool
44 Requires(post): /sbin/ldconfig
45 Requires(postun): /sbin/ldconfig
49 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
50 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
54 Summary: Bluetooth framework for BlueZ and Obexd
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
59 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
60 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
63 Summary: Bluetooth Service daemon
64 Group: Network & Connectivity/Bluetooth
65 Requires: %{name} = %{version}-%{release}
68 This package is Bluetooth Service daemon to manage BT services.
71 Summary: Bluetooth HTTP Proxy Service daemon
73 Requires: %{name} = %{version}-%{release}
75 %description httpproxy
76 This package is Bluetooth HTTP Proxy Service daemon
79 Summary: Bluetooth Core daemon
80 Group: Network & Connectivity/Bluetooth
81 Requires: %{name} = %{version}-%{release}
84 This package is Bluetooth core daemon to manage activation / deactivation.
87 Summary: Bluetooth test application
88 Group: Network & Connectivity/Bluetooth
89 Requires: %{name} = %{version}-%{release}
92 This package is Bluetooth test application.
100 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE -DTIZEN_BT_DUAL_HEADSET_CONNECT"
101 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
102 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
104 %define _servicefile packaging/bluetooth-frwk-common.service
105 %define _servicedir starter.target.wants
107 %if "%{?profile}" == "mobile"
108 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_NETWORK_TETHERING_ENABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED -DTIZEN_PROFILE_MOBILE -DTIZEN_FEATURE_TELEPHONY_ENABLED"
109 %if "%{?tizen_target_name}" == "TM1"
110 %define _servicefile packaging/bluetooth-frwk-mobile-sprd.service
112 %define _servicefile packaging/bluetooth-frwk-mobile.service
114 %define _servicedir multi-user.target.wants
117 %if "%{?profile}" == "wearable"
118 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_WEARABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED"
119 %define _servicefile packaging/bluetooth-frwk-wearable.service
120 %define _servicedir multi-user.target.wants
123 %if "%{?profile}" == "tv"
124 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_USB_DONGLE -DTIZEN_PROFILE_TV"
125 %define _servicefile packaging/bluetooth-frwk-tv.service
126 %define _servicedir multi-user.target.wants
129 %if "%{?profile}" == "ivi"
130 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI"
131 %define _servicefile packaging/bluetooth-frwk-wearable.service
132 %define _servicedir multi-user.target.wants
136 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC -DARCH64"
137 export CXXFLAGS+=" -DARCH64"
138 export FFLAGS+=" -DARCH64"
140 export CFLAGS="$CFLAGS -fpie"
141 export LDFLAGS="$CFLAGS -pie"
144 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
145 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
147 %if "%{?_with_emulator}" == "1"
148 export CFLAGS="$CFLAGS -DTIZEN_TEST_EMUL"
149 export CXXFLAGS="$CXXFLAGS -DTIZEN_TEST_EMUL"
150 export FFLAGS="$FFLAGS -DTIZEN_TEST_EMUL"
154 %if "%{?tizen_target_name}" == "TM1"
155 export CFLAGS="${CFLAGS} -DTIZEN_FEATURE_RADIO"
156 export CXXFLAGS="$CXXFLAGS -DTIZEN_FEATURE_RADIO"
157 export FFLAGS="$FFLAGS -DTIZEN_FEATURE_RADIO"
162 export CFLAGS+=" -DARCH64"
163 export CXXFLAGS+=" -DARCH64"
164 export FFLAGS+=" -DARCH64"
167 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
168 -DCMAKE_LIB_DIR=%{_libdir} \
169 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
170 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
171 -DLIBNOTIFY_SUPPORT=Off \
172 -DLIBNOTIFICATION_SUPPORT=Off
176 %if "%{?profile}" == "wearable"
177 -DTIZEN_PROFILE_WEARABLE=YES \
179 -DTIZEN_PROFILE_WEARABLE=NO \
181 %if "%{?profile}" == "common"
182 -DTIZEN_PROFILE_WEARABLE=NO \
189 #mkdir -p %{buildroot}%{_libdir}/systemd/user
190 #install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_libdir}/systemd/user
191 mkdir -p %{buildroot}%{_unitdir}/%{_servicedir}
192 install -m 0644 %{_servicefile} %{buildroot}%{_unitdir}/bluetooth-frwk.service
193 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/%{_servicedir}/bluetooth-frwk.service
195 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
196 %if "%{profile}"=="ivi"
197 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
203 #%if "%{?profile}" == "wearable"
204 #vconftool set -f -t int db/bluetooth/status "1" -g 6520
206 #%if "%{?profile}" == "mobile"
207 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
209 #%if "%{?profile}" == "common"
210 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
213 #vconftool set -f -t int db/bluetooth/status "0" -s User
214 #vconftool set -f -t int db/bluetooth/lestatus "0" -s User
215 #vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
216 #vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
217 #vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
218 #vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
219 #vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
220 #vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
221 #vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
225 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
226 #ln -sf %{_libdir}/systemd/user/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
228 %postun -p /sbin/ldconfig
231 %manifest %{name}.manifest
233 %defattr(-, root, root)
234 %{_libdir}/libbluetooth-api.so.*
235 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
236 %{_unitdir}/bluetooth-frwk.service
239 %defattr(-, root, root)
240 %{_includedir}/bt-service/bluetooth-api.h
241 %{_includedir}/bt-service/bluetooth-hid-api.h
242 %{_includedir}/bt-service/bluetooth-audio-api.h
243 %{_includedir}/bt-service/bluetooth-telephony-api.h
244 %{_includedir}/bt-service/bluetooth-media-control.h
245 %{_includedir}/bt-service/bluetooth-scmst-api.h
246 %{_includedir}/bt-service/bluetooth-ipsp-api.h
247 %{_libdir}/pkgconfig/bluetooth-api.pc
248 %{_libdir}/libbluetooth-api.so
251 %manifest %{name}.manifest
253 %defattr(-, root, root)
254 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
255 %{_bindir}/bt-service
256 #%{_libdir}/systemd/user/bluetooth-frwk-tv.service
257 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
258 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
259 %{_bindir}/bluetooth-frwk-test
260 #%{_bindir}/bluetooth-gatt-test
261 #%{_bindir}/bluetooth-advertising-test
262 %{_varlibdir}/bluetooth
263 %{_prefix}/etc/bluetooth
264 #%attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
265 #%attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
266 #%{_dumpdir}/bluetooth_log_dump.sh
269 %manifest %{name}.manifest
271 %defattr(-, root, root)
272 %{_bindir}/bt-httpproxy
273 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
274 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
277 %manifest %{name}.manifest
279 %defattr(-, root, root)
280 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
282 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
285 %manifest %{name}.manifest
287 %defattr(-, root, root)
288 %{_bindir}/bluetooth-frwk-test
289 #%{_bindir}/bluetooth-gatt-test
290 #%{_bindir}/bluetooth-advertising-test