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
19 %if "%{?profile}" != "mobile"
20 Requires: bluetooth-tools
22 BuildRequires: pkgconfig(aul)
23 BuildRequires: pkgconfig(dbus-glib-1)
24 BuildRequires: pkgconfig(dlog)
25 BuildRequires: pkgconfig(glib-2.0)
26 BuildRequires: pkgconfig(gio-2.0)
27 BuildRequires: pkgconfig(gio-unix-2.0)
28 %if %{with bluetooth_frwk_libnotify}
29 BuildRequires: pkgconfig(libnotify)
30 BuildRequires: pkgconfig(gdk-pixbuf-2.0)
31 BuildRequires: pkgconfig(gtk+-3.0)
32 %elif %{without bluetooth_frwk_libnotification}
33 BuildRequires: pkgconfig(syspopup-caller)
36 BuildRequires: pkgconfig(syspopup-caller)
38 BuildRequires: pkgconfig(vconf)
39 BuildRequires: pkgconfig(libxml-2.0)
40 BuildRequires: pkgconfig(dbus-1)
42 BuildRequires: pkgconfig(utilX)
44 BuildRequires: pkgconfig(capi-network-connection)
45 BuildRequires: pkgconfig(alarm-service)
46 BuildRequires: pkgconfig(capi-content-mime-type)
47 BuildRequires: pkgconfig(appcore-efl)
48 BuildRequires: pkgconfig(pkgmgr)
49 #BuildRequires: pkgconfig(journal)
50 BuildRequires: pkgconfig(eventsystem)
51 BuildRequires: pkgconfig(libsoup-2.4)
52 %if "%{?profile}" == "mobile"
53 BuildRequires: pkgconfig(capi-network-tethering)
56 BuildRequires: pkgconfig(cynara-client)
57 BuildRequires: pkgconfig(cynara-creds-gdbus)
58 BuildRequires: pkgconfig(libtzplatform-config)
59 BuildRequires: pkgconfig(storage)
61 Requires(post): /usr/bin/vconftool
62 Requires(post): /sbin/ldconfig
63 Requires(postun): /sbin/ldconfig
67 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
68 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
72 Summary: Bluetooth framework for BlueZ and Obexd
73 Group: Development/Libraries
74 Requires: %{name} = %{version}-%{release}
77 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
78 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
81 Summary: Bluetooth Service daemon
82 Group: Network & Connectivity/Bluetooth
83 Requires: %{name} = %{version}-%{release}
86 This package is Bluetooth Service daemon to manage BT services.
89 Summary: Bluetooth HTTP Proxy Service daemon
91 Requires: %{name} = %{version}-%{release}
93 %description httpproxy
94 This package is Bluetooth HTTP Proxy Service daemon
97 Summary: Bluetooth Core daemon
98 Group: Network & Connectivity/Bluetooth
99 Requires: %{name} = %{version}-%{release}
102 This package is Bluetooth core daemon to manage activation / deactivation.
105 Summary: Bluetooth test application
106 Group: Network & Connectivity/Bluetooth
107 Requires: %{name} = %{version}-%{release}
110 This package is Bluetooth test application.
118 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
119 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
120 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
122 %define _servicefile packaging/bluetooth-frwk-common.service
123 %define _servicedir starter.target.wants
125 %if "%{?profile}" == "mobile"
126 export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE -DTIZEN_BT_FLIGHTMODE_ENABLED -DTIZEN_MOBILE -DTIZEN_TELEPHONY_ENABLED"
127 %if "%{?tizen_target_name}" == "TM1"
128 %define _servicefile packaging/bluetooth-frwk-mobile-sprd.service
130 %define _servicefile packaging/bluetooth-frwk-mobile.service
132 %define _servicedir multi-user.target.wants
135 %if "%{?profile}" == "wearable"
136 export CFLAGS="$CFLAGS -DTIZEN_WEARABLE -DTIZEN_BT_FLIGHTMODE_ENABLED"
137 %define _servicefile packaging/bluetooth-frwk-wearable.service
138 %define _servicedir multi-user.target.wants
141 %if "%{?profile}" == "tv"
142 export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV -DAUTO_ACCEPT"
143 %define _servicefile packaging/bluetooth-frwk-mobile.service
144 %define _servicedir multi-user.target.wants
148 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
150 export CFLAGS="$CFLAGS -fpie"
151 export LDFLAGS="$CFLAGS -pie"
154 export CFLAGS="$CFLAGS -DRFCOMM_DIRECT"
155 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
157 %if "%{?_with_emulator}" == "1"
158 export CFLAGS="$CFLAGS -DEMUL"
159 export CXXFLAGS="$CXXFLAGS -DEMUL"
160 export FFLAGS="$FFLAGS -DEMUL"
163 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
164 -DCMAKE_LIB_DIR=%{_libdir} \
165 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
166 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
167 %if %{with bluetooth_frwk_libnotify}
168 -DLIBNOTIFY_SUPPORT=On \
170 -DLIBNOTIFY_SUPPORT=Off \
172 %if %{with bluetooth_frwk_libnotification}
173 -DLIBNOTIFICATION_SUPPORT=On
175 -DLIBNOTIFICATION_SUPPORT=Off
181 %if "%{?profile}" == "wearable"
182 -DTIZEN_WEARABLE=YES \
184 -DTIZEN_WEARABLE=NO \
186 %if "%{?profile}" == "common"
187 -DTIZEN_WEARABLE=NO \
194 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
195 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
196 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy
197 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
199 #mkdir -p %{buildroot}%{_libdir}/systemd/user
200 #install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_libdir}/systemd/user
201 mkdir -p %{buildroot}%{_unitdir}/%{_servicedir}
202 install -m 0644 %{_servicefile} %{buildroot}%{_unitdir}/bluetooth-frwk.service
203 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/%{_servicedir}/bluetooth-frwk.service
205 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
206 mkdir -p %{buildroot}%{_datadir}/icons/default
207 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
210 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
211 %if "%{profile}"=="ivi"
212 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
218 #%if "%{?profile}" == "wearable"
219 #vconftool set -f -t int db/bluetooth/status "1" -g 6520
221 #%if "%{?profile}" == "mobile"
222 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
224 #%if "%{?profile}" == "common"
225 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
228 #vconftool set -f -t int db/bluetooth/status "0" -s User
229 #vconftool set -f -t int db/bluetooth/lestatus "0" -s User
230 #vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
231 #vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
232 #vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
233 #vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
234 #vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
235 #vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
236 #vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
240 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
241 #ln -sf %{_libdir}/systemd/user/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
243 %postun -p /sbin/ldconfig
246 %manifest %{name}.manifest
247 %defattr(-, root, root)
248 %{_libdir}/libbluetooth-api.so.*
249 %{_datadir}/license/bluetooth-frwk
250 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
251 %{_unitdir}/bluetooth-frwk.service
254 %defattr(-, root, root)
255 %{_includedir}/bt-service/bluetooth-api.h
256 %{_includedir}/bt-service/bluetooth-hid-api.h
257 %{_includedir}/bt-service/bluetooth-audio-api.h
258 %{_includedir}/bt-service/bluetooth-telephony-api.h
259 %{_includedir}/bt-service/bluetooth-media-control.h
260 %{_includedir}/bt-service/bluetooth-scmst-api.h
261 %{_includedir}/bt-service/bluetooth-ipsp-api.h
262 %{_libdir}/pkgconfig/bluetooth-api.pc
263 %{_libdir}/libbluetooth-api.so
264 %{_datadir}/license/bluetooth-frwk-devel
267 %manifest %{name}.manifest
268 %defattr(-, root, root)
269 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
270 %{_bindir}/bt-service
271 #%{_libdir}/systemd/user/bluetooth-frwk-tv.service
272 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
273 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
274 %{_bindir}/bluetooth-frwk-test
275 #%{_bindir}/bluetooth-gatt-test
276 #%{_bindir}/bluetooth-advertising-test
277 %{_varlibdir}/bluetooth
278 %{_prefix}/etc/bluetooth
279 #%attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
280 #%attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
281 #%{_dumpdir}/bluetooth_log_dump.sh
282 %{_datadir}/license/bluetooth-frwk-service
283 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
284 %{_datadir}/icons/default/bt-icon.png
288 %manifest %{name}.manifest
289 %defattr(-, root, root)
290 %{_bindir}/bt-httpproxy
291 %{_datadir}/license/bluetooth-frwk-httpproxy
292 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
293 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-httpproxy.conf
296 %manifest %{name}.manifest
297 %defattr(-, root, root)
298 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
300 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
303 %manifest %{name}.manifest
304 %defattr(-, root, root)
305 %{_bindir}/bluetooth-frwk-test
306 %{_bindir}/bluetooth-gatt-test
307 %{_bindir}/bluetooth-advertising-test