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
16 %if "%{?profile}" != "mobile"
17 Requires: bluetooth-tools
19 BuildRequires: pkgconfig(aul)
20 BuildRequires: pkgconfig(dbus-glib-1)
21 BuildRequires: pkgconfig(dlog)
22 BuildRequires: pkgconfig(glib-2.0)
23 BuildRequires: pkgconfig(gio-2.0)
24 BuildRequires: pkgconfig(gio-unix-2.0)
25 BuildRequires: pkgconfig(syspopup-caller)
26 BuildRequires: pkgconfig(vconf)
27 BuildRequires: pkgconfig(libxml-2.0)
28 BuildRequires: pkgconfig(dbus-1)
29 BuildRequires: pkgconfig(capi-network-connection)
30 BuildRequires: pkgconfig(alarm-service)
31 BuildRequires: pkgconfig(capi-content-mime-type)
32 BuildRequires: pkgconfig(appcore-efl)
33 BuildRequires: pkgconfig(pkgmgr)
34 #BuildRequires: pkgconfig(journal)
35 BuildRequires: pkgconfig(eventsystem)
36 BuildRequires: pkgconfig(libsoup-2.4)
37 %if "%{?profile}" == "mobile"
38 BuildRequires: pkgconfig(capi-network-tethering)
41 BuildRequires: pkgconfig(cynara-client)
42 BuildRequires: pkgconfig(cynara-creds-gdbus)
43 BuildRequires: pkgconfig(libtzplatform-config)
44 BuildRequires: pkgconfig(storage)
46 Requires(post): /usr/bin/vconftool
47 Requires(post): /sbin/ldconfig
48 Requires(postun): /sbin/ldconfig
52 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
53 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
57 Summary: Bluetooth framework for BlueZ and Obexd
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
62 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
63 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
66 Summary: Bluetooth Service daemon
67 Group: Network & Connectivity/Bluetooth
68 Requires: %{name} = %{version}-%{release}
71 This package is Bluetooth Service daemon to manage BT services.
74 Summary: Bluetooth HTTP Proxy Service daemon
76 Requires: %{name} = %{version}-%{release}
78 %description httpproxy
79 This package is Bluetooth HTTP Proxy Service daemon
82 Summary: Bluetooth Core daemon
83 Group: Network & Connectivity/Bluetooth
84 Requires: %{name} = %{version}-%{release}
87 This package is Bluetooth core daemon to manage activation / deactivation.
90 Summary: Bluetooth test application
91 Group: Network & Connectivity/Bluetooth
92 Requires: %{name} = %{version}-%{release}
95 This package is Bluetooth test application.
103 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
104 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
105 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
107 %define _servicefile packaging/bluetooth-frwk-common.service
108 %define _servicedir starter.target.wants
110 %if "%{?profile}" == "mobile"
111 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_NETWORK_TETHERING_ENABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED -DTIZEN_PROFILE_MOBILE -DTIZEN_FEATURE_TELEPHONY_ENABLED"
112 %if "%{?tizen_target_name}" == "TM1"
113 %define _servicefile packaging/bluetooth-frwk-mobile-sprd.service
115 %define _servicefile packaging/bluetooth-frwk-mobile.service
117 %define _servicedir multi-user.target.wants
120 %if "%{?profile}" == "wearable"
121 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_WEARABLE -DTIZEN_FEATURE_FLIGHTMODE_ENABLED"
122 %define _servicefile packaging/bluetooth-frwk-wearable.service
123 %define _servicedir multi-user.target.wants
126 %if "%{?profile}" == "tv"
127 export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV -DAUTO_ACCEPT"
128 %define _servicefile packaging/bluetooth-frwk-tv.service
129 %define _servicedir multi-user.target.wants
132 %if "%{?profile}" == "ivi"
133 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI"
134 %define _servicefile packaging/bluetooth-frwk-wearable.service
135 %define _servicedir multi-user.target.wants
139 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
141 export CFLAGS="$CFLAGS -fpie"
142 export LDFLAGS="$CFLAGS -pie"
145 export CFLAGS="$CFLAGS -DRFCOMM_DIRECT"
146 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
148 %if "%{?_with_emulator}" == "1"
149 export CFLAGS="$CFLAGS -DTIZEN_TEST_EMUL"
150 export CXXFLAGS="$CXXFLAGS -DTIZEN_TEST_EMUL"
151 export FFLAGS="$FFLAGS -DTIZEN_TEST_EMUL"
154 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
155 -DCMAKE_LIB_DIR=%{_libdir} \
156 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
157 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
158 -DLIBNOTIFY_SUPPORT=Off \
159 -DLIBNOTIFICATION_SUPPORT=Off
163 %if "%{?profile}" == "wearable"
164 -DTIZEN_PROFILE_WEARABLE=YES \
166 -DTIZEN_PROFILE_WEARABLE=NO \
168 %if "%{?profile}" == "common"
169 -DTIZEN_PROFILE_WEARABLE=NO \
176 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
177 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
178 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy
179 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
181 #mkdir -p %{buildroot}%{_libdir}/systemd/user
182 #install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_libdir}/systemd/user
183 mkdir -p %{buildroot}%{_unitdir}/%{_servicedir}
184 install -m 0644 %{_servicefile} %{buildroot}%{_unitdir}/bluetooth-frwk.service
185 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/%{_servicedir}/bluetooth-frwk.service
187 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
188 %if "%{profile}"=="ivi"
189 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
195 #%if "%{?profile}" == "wearable"
196 #vconftool set -f -t int db/bluetooth/status "1" -g 6520
198 #%if "%{?profile}" == "mobile"
199 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
201 #%if "%{?profile}" == "common"
202 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
205 #vconftool set -f -t int db/bluetooth/status "0" -s User
206 #vconftool set -f -t int db/bluetooth/lestatus "0" -s User
207 #vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
208 #vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
209 #vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
210 #vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
211 #vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
212 #vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
213 #vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
217 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
218 #ln -sf %{_libdir}/systemd/user/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
220 %postun -p /sbin/ldconfig
223 %manifest %{name}.manifest
224 %defattr(-, root, root)
225 %{_libdir}/libbluetooth-api.so.*
226 %{_datadir}/license/bluetooth-frwk
227 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
228 %{_unitdir}/bluetooth-frwk.service
231 %defattr(-, root, root)
232 %{_includedir}/bt-service/bluetooth-api.h
233 %{_includedir}/bt-service/bluetooth-hid-api.h
234 %{_includedir}/bt-service/bluetooth-audio-api.h
235 %{_includedir}/bt-service/bluetooth-telephony-api.h
236 %{_includedir}/bt-service/bluetooth-media-control.h
237 %{_includedir}/bt-service/bluetooth-scmst-api.h
238 %{_includedir}/bt-service/bluetooth-ipsp-api.h
239 %{_libdir}/pkgconfig/bluetooth-api.pc
240 %{_libdir}/libbluetooth-api.so
241 %{_datadir}/license/bluetooth-frwk-devel
244 %manifest %{name}.manifest
245 %defattr(-, root, root)
246 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
247 %{_bindir}/bt-service
248 #%{_libdir}/systemd/user/bluetooth-frwk-tv.service
249 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
250 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
251 %{_bindir}/bluetooth-frwk-test
252 #%{_bindir}/bluetooth-gatt-test
253 #%{_bindir}/bluetooth-advertising-test
254 %{_varlibdir}/bluetooth
255 %{_prefix}/etc/bluetooth
256 #%attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
257 #%attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
258 #%{_dumpdir}/bluetooth_log_dump.sh
259 %{_datadir}/license/bluetooth-frwk-service
262 %manifest %{name}.manifest
263 %defattr(-, root, root)
264 %{_bindir}/bt-httpproxy
265 %{_datadir}/license/bluetooth-frwk-httpproxy
266 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
267 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
270 %manifest %{name}.manifest
271 %defattr(-, root, root)
272 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
274 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
277 %manifest %{name}.manifest
278 %defattr(-, root, root)
279 %{_bindir}/bluetooth-frwk-test
280 %{_bindir}/bluetooth-gatt-test
281 %{_bindir}/bluetooth-advertising-test