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
20 %if "%{?profile}" != "mobile"
21 Requires: bluetooth-tools
23 BuildRequires: pkgconfig(aul)
24 BuildRequires: pkgconfig(dbus-glib-1)
25 BuildRequires: pkgconfig(dlog)
26 BuildRequires: pkgconfig(glib-2.0)
27 BuildRequires: pkgconfig(gio-2.0)
28 BuildRequires: pkgconfig(gio-unix-2.0)
29 %if %{with bluetooth_frwk_libnotify}
30 BuildRequires: pkgconfig(libnotify)
31 BuildRequires: pkgconfig(gdk-pixbuf-2.0)
32 BuildRequires: pkgconfig(gtk+-3.0)
33 %elif %{without bluetooth_frwk_libnotification}
34 BuildRequires: pkgconfig(syspopup-caller)
37 BuildRequires: pkgconfig(syspopup-caller)
39 BuildRequires: pkgconfig(vconf)
40 BuildRequires: pkgconfig(libxml-2.0)
41 BuildRequires: pkgconfig(dbus-1)
43 BuildRequires: pkgconfig(utilX)
45 BuildRequires: pkgconfig(capi-network-connection)
46 BuildRequires: pkgconfig(alarm-service)
47 BuildRequires: pkgconfig(capi-content-mime-type)
48 BuildRequires: pkgconfig(appcore-efl)
49 BuildRequires: pkgconfig(pkgmgr)
50 #BuildRequires: pkgconfig(journal)
51 #BuildRequires: pkgconfig(eventsystem)
52 %if "%{?profile}" == "mobile"
53 BuildRequires: pkgconfig(capi-network-tethering)
56 BuildRequires: pkgconfig(libprivilege-control)
57 BuildRequires: pkgconfig(cynara-client)
58 BuildRequires: pkgconfig(cynara-creds-gdbus)
59 BuildRequires: pkgconfig(libtzplatform-config)
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 Core daemon
90 Group: Network & Connectivity/Bluetooth
91 Requires: %{name} = %{version}-%{release}
94 This package is Bluetooth core daemon to manage activation / deactivation.
97 Summary: Bluetooth test application
98 Group: Network & Connectivity/Bluetooth
99 Requires: %{name} = %{version}-%{release}
102 This package is Bluetooth test application.
110 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
111 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
112 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
114 %define _servicefile packaging/bluetooth-frwk-common.service
115 %define _servicedir starter.target.wants
117 %if "%{?profile}" == "mobile"
118 export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE -DTIZEN_BT_FLIGHTMODE_ENABLED -DTIZEN_MOBILE -DTIZEN_TELEPHONY_ENABLED -DAUTO_ACCEPT"
119 %define _servicefile packaging/bluetooth-frwk-mobile.service
120 %define _servicedir multi-user.target.wants
123 %if "%{?profile}" == "wearable"
124 export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
125 %define _servicefile packaging/bluetooth-frwk-wearable.service
126 %define _servicedir multi-user.target.wants
129 %if "%{?profile}" == "tv"
130 export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV -DAUTO_ACCEPT"
131 %define _servicefile packaging/bluetooth-frwk-mobile.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 -DRFCOMM_DIRECT"
143 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
145 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
146 -DCMAKE_LIB_DIR=%{_libdir} \
147 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
148 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
149 %if %{with bluetooth_frwk_libnotify}
150 -DLIBNOTIFY_SUPPORT=On \
152 -DLIBNOTIFY_SUPPORT=Off \
154 %if %{with bluetooth_frwk_libnotification}
155 -DLIBNOTIFICATION_SUPPORT=On
157 -DLIBNOTIFICATION_SUPPORT=Off
163 %if "%{?profile}" == "wearable"
164 -DTIZEN_WEARABLE=YES \
166 -DTIZEN_WEARABLE=NO \
168 %if "%{?profile}" == "common"
169 -DTIZEN_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-devel
180 #mkdir -p %{buildroot}%{_libdir}/systemd/user
181 #install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_libdir}/systemd/user
182 mkdir -p %{buildroot}%{_unitdir}/%{_servicedir}
183 install -m 0644 %{_servicefile} %{buildroot}%{_unitdir}/bluetooth-frwk.service
184 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/%{_servicedir}/bluetooth-frwk.service
186 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
187 mkdir -p %{buildroot}%{_datadir}/icons/default
188 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
191 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
192 %if "%{profile}"=="ivi"
193 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
199 %if "%{?profile}" == "wearable"
200 vconftool set -f -t int db/bluetooth/status "1" -g 6520
202 %if "%{?profile}" == "mobile"
203 vconftool set -f -t int db/bluetooth/status "0" -g 6520
205 %if "%{?profile}" == "common"
206 vconftool set -f -t int db/bluetooth/status "0" -g 6520
209 vconftool set -f -t int db/bluetooth/status "0" -s User
210 vconftool set -f -t int db/bluetooth/lestatus "0" -s User
211 vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
212 vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
213 vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
214 vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
215 vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
216 vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
217 vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
221 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
222 #ln -sf %{_libdir}/systemd/user/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
224 %postun -p /sbin/ldconfig
227 %manifest %{name}.manifest
228 %defattr(-, root, root)
229 %{_libdir}/libbluetooth-api.so.*
230 %{_datadir}/license/bluetooth-frwk
231 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
232 %{_unitdir}/bluetooth-frwk.service
235 %defattr(-, root, root)
236 %{_includedir}/bt-service/bluetooth-api.h
237 %{_includedir}/bt-service/bluetooth-hid-api.h
238 %{_includedir}/bt-service/bluetooth-audio-api.h
239 %{_includedir}/bt-service/bluetooth-telephony-api.h
240 %{_includedir}/bt-service/bluetooth-media-control.h
241 %{_includedir}/bt-service/bluetooth-scmst-api.h
242 %{_libdir}/pkgconfig/bluetooth-api.pc
243 %{_libdir}/libbluetooth-api.so
244 %{_datadir}/license/bluetooth-frwk-devel
247 %manifest %{name}.manifest
248 %defattr(-, root, root)
249 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
251 %{_bindir}/bt-service
252 #%{_libdir}/systemd/user/bluetooth-frwk-tv.service
253 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
254 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
255 %{_bindir}/bluetooth-frwk-test
256 #%{_bindir}/bluetooth-gatt-test
257 #%{_bindir}/bluetooth-advertising-test
258 %{_varlibdir}/bluetooth
259 %{_prefix}/etc/bluetooth
260 #%attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
261 #%attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
262 #%{_dumpdir}/bluetooth_log_dump.sh
263 %{_datadir}/license/bluetooth-frwk-service
264 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
265 %{_datadir}/icons/default/bt-icon.png
269 %manifest %{name}.manifest
270 %defattr(-, root, root)
271 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
273 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
276 %manifest %{name}.manifest
277 %defattr(-, root, root)
278 %{_bindir}/bluetooth-frwk-test
279 %{_bindir}/bluetooth-gatt-test
280 %{_bindir}/bluetooth-advertising-test