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"
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"
138 export CFLAGS="$CFLAGS -fpie"
139 export LDFLAGS="$CFLAGS -pie"
142 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_RFCOMM_DIRECT"
143 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
145 %if "%{?_with_emulator}" == "1"
146 export CFLAGS="$CFLAGS -DTIZEN_TEST_EMUL"
147 export CXXFLAGS="$CXXFLAGS -DTIZEN_TEST_EMUL"
148 export FFLAGS="$FFLAGS -DTIZEN_TEST_EMUL"
152 %if "%{?tizen_target_name}" == "TM1"
153 export CFLAGS="${CFLAGS} -DTIZEN_FEATURE_RADIO"
154 export CXXFLAGS="$CXXFLAGS -DTIZEN_FEATURE_RADIO"
155 export FFLAGS="$FFLAGS -DTIZEN_FEATURE_RADIO"
160 export CFLAGS+=" -DARCH64"
161 export CXXFLAGS+=" -DARCH64"
162 export FFLAGS+=" -DARCH64"
165 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
166 -DCMAKE_LIB_DIR=%{_libdir} \
167 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
168 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
169 -DLIBNOTIFY_SUPPORT=Off \
170 -DLIBNOTIFICATION_SUPPORT=Off
174 %if "%{?profile}" == "wearable"
175 -DTIZEN_PROFILE_WEARABLE=YES \
177 -DTIZEN_PROFILE_WEARABLE=NO \
179 %if "%{?profile}" == "common"
180 -DTIZEN_PROFILE_WEARABLE=NO \
187 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
188 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
189 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy
190 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
192 #mkdir -p %{buildroot}%{_libdir}/systemd/user
193 #install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_libdir}/systemd/user
194 mkdir -p %{buildroot}%{_unitdir}/%{_servicedir}
195 install -m 0644 %{_servicefile} %{buildroot}%{_unitdir}/bluetooth-frwk.service
196 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/%{_servicedir}/bluetooth-frwk.service
198 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
199 %if "%{profile}"=="ivi"
200 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
206 #%if "%{?profile}" == "wearable"
207 #vconftool set -f -t int db/bluetooth/status "1" -g 6520
209 #%if "%{?profile}" == "mobile"
210 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
212 #%if "%{?profile}" == "common"
213 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
216 #vconftool set -f -t int db/bluetooth/status "0" -s User
217 #vconftool set -f -t int db/bluetooth/lestatus "0" -s User
218 #vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
219 #vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
220 #vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
221 #vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
222 #vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
223 #vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
224 #vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
228 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
229 #ln -sf %{_libdir}/systemd/user/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
231 %postun -p /sbin/ldconfig
234 %manifest %{name}.manifest
235 %defattr(-, root, root)
236 %{_libdir}/libbluetooth-api.so.*
237 %{_datadir}/license/bluetooth-frwk
238 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
239 %{_unitdir}/bluetooth-frwk.service
242 %defattr(-, root, root)
243 %{_includedir}/bt-service/bluetooth-api.h
244 %{_includedir}/bt-service/bluetooth-hid-api.h
245 %{_includedir}/bt-service/bluetooth-audio-api.h
246 %{_includedir}/bt-service/bluetooth-telephony-api.h
247 %{_includedir}/bt-service/bluetooth-media-control.h
248 %{_includedir}/bt-service/bluetooth-scmst-api.h
249 %{_includedir}/bt-service/bluetooth-ipsp-api.h
250 %{_libdir}/pkgconfig/bluetooth-api.pc
251 %{_libdir}/libbluetooth-api.so
252 %{_datadir}/license/bluetooth-frwk-devel
255 %manifest %{name}.manifest
256 %defattr(-, root, root)
257 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
258 %{_bindir}/bt-service
259 #%{_libdir}/systemd/user/bluetooth-frwk-tv.service
260 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
261 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
262 %{_bindir}/bluetooth-frwk-test
263 #%{_bindir}/bluetooth-gatt-test
264 #%{_bindir}/bluetooth-advertising-test
265 %{_varlibdir}/bluetooth
266 %{_prefix}/etc/bluetooth
267 #%attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
268 #%attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
269 #%{_dumpdir}/bluetooth_log_dump.sh
270 %{_datadir}/license/bluetooth-frwk-service
273 %manifest %{name}.manifest
274 %defattr(-, root, root)
275 %{_bindir}/bt-httpproxy
276 %{_datadir}/license/bluetooth-frwk-httpproxy
277 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
278 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
281 %manifest %{name}.manifest
282 %defattr(-, root, root)
283 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
285 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
288 %manifest %{name}.manifest
289 %defattr(-, root, root)
290 %{_bindir}/bluetooth-frwk-test
291 #%{_bindir}/bluetooth-gatt-test
292 #%{_bindir}/bluetooth-advertising-test