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"
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 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
158 -DCMAKE_LIB_DIR=%{_libdir} \
159 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
160 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
161 %if %{with bluetooth_frwk_libnotify}
162 -DLIBNOTIFY_SUPPORT=On \
164 -DLIBNOTIFY_SUPPORT=Off \
166 %if %{with bluetooth_frwk_libnotification}
167 -DLIBNOTIFICATION_SUPPORT=On
169 -DLIBNOTIFICATION_SUPPORT=Off
175 %if "%{?profile}" == "wearable"
176 -DTIZEN_WEARABLE=YES \
178 -DTIZEN_WEARABLE=NO \
180 %if "%{?profile}" == "common"
181 -DTIZEN_WEARABLE=NO \
188 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
189 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
190 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy
191 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
193 #mkdir -p %{buildroot}%{_libdir}/systemd/user
194 #install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_libdir}/systemd/user
195 mkdir -p %{buildroot}%{_unitdir}/%{_servicedir}
196 install -m 0644 %{_servicefile} %{buildroot}%{_unitdir}/bluetooth-frwk.service
197 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/%{_servicedir}/bluetooth-frwk.service
199 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
200 mkdir -p %{buildroot}%{_datadir}/icons/default
201 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
204 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
205 %if "%{profile}"=="ivi"
206 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
212 #%if "%{?profile}" == "wearable"
213 #vconftool set -f -t int db/bluetooth/status "1" -g 6520
215 #%if "%{?profile}" == "mobile"
216 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
218 #%if "%{?profile}" == "common"
219 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
222 #vconftool set -f -t int db/bluetooth/status "0" -s User
223 #vconftool set -f -t int db/bluetooth/lestatus "0" -s User
224 #vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
225 #vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
226 #vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
227 #vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
228 #vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
229 #vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
230 #vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
234 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
235 #ln -sf %{_libdir}/systemd/user/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
237 %postun -p /sbin/ldconfig
240 %manifest %{name}.manifest
241 %defattr(-, root, root)
242 %{_libdir}/libbluetooth-api.so.*
243 %{_datadir}/license/bluetooth-frwk
244 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
245 %{_unitdir}/bluetooth-frwk.service
248 %defattr(-, root, root)
249 %{_includedir}/bt-service/bluetooth-api.h
250 %{_includedir}/bt-service/bluetooth-hid-api.h
251 %{_includedir}/bt-service/bluetooth-audio-api.h
252 %{_includedir}/bt-service/bluetooth-telephony-api.h
253 %{_includedir}/bt-service/bluetooth-media-control.h
254 %{_includedir}/bt-service/bluetooth-scmst-api.h
255 %{_includedir}/bt-service/bluetooth-ipsp-api.h
256 %{_libdir}/pkgconfig/bluetooth-api.pc
257 %{_libdir}/libbluetooth-api.so
258 %{_datadir}/license/bluetooth-frwk-devel
261 %manifest %{name}.manifest
262 %defattr(-, root, root)
263 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
264 %{_bindir}/bt-service
265 #%{_libdir}/systemd/user/bluetooth-frwk-tv.service
266 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
267 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
268 %{_bindir}/bluetooth-frwk-test
269 #%{_bindir}/bluetooth-gatt-test
270 #%{_bindir}/bluetooth-advertising-test
271 %{_varlibdir}/bluetooth
272 %{_prefix}/etc/bluetooth
273 #%attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
274 #%attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
275 #%{_dumpdir}/bluetooth_log_dump.sh
276 %{_datadir}/license/bluetooth-frwk-service
277 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
278 %{_datadir}/icons/default/bt-icon.png
282 %manifest %{name}.manifest
283 %defattr(-, root, root)
284 %{_bindir}/bt-httpproxy
285 %{_datadir}/license/bluetooth-frwk-httpproxy
286 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
289 %manifest %{name}.manifest
290 %defattr(-, root, root)
291 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
293 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
296 %manifest %{name}.manifest
297 %defattr(-, root, root)
298 %{_bindir}/bluetooth-frwk-test
299 %{_bindir}/bluetooth-gatt-test
300 %{_bindir}/bluetooth-advertising-test