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)
60 Requires(post): /usr/bin/vconftool
61 Requires(post): /sbin/ldconfig
62 Requires(postun): /sbin/ldconfig
66 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
67 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
71 Summary: Bluetooth framework for BlueZ and Obexd
72 Group: Development/Libraries
73 Requires: %{name} = %{version}-%{release}
76 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
77 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
80 Summary: Bluetooth Service daemon
81 Group: Network & Connectivity/Bluetooth
82 Requires: %{name} = %{version}-%{release}
85 This package is Bluetooth Service daemon to manage BT services.
88 Summary: Bluetooth HTTP Proxy Service daemon
90 Requires: %{name} = %{version}-%{release}
92 %description httpproxy
93 This package is Bluetooth HTTP Proxy Service daemon
96 Summary: Bluetooth Core daemon
97 Group: Network & Connectivity/Bluetooth
98 Requires: %{name} = %{version}-%{release}
101 This package is Bluetooth core daemon to manage activation / deactivation.
104 Summary: Bluetooth test application
105 Group: Network & Connectivity/Bluetooth
106 Requires: %{name} = %{version}-%{release}
109 This package is Bluetooth test application.
117 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
118 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
119 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
121 %define _servicefile packaging/bluetooth-frwk-common.service
122 %define _servicedir starter.target.wants
124 %if "%{?profile}" == "mobile"
125 export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE -DTIZEN_BT_FLIGHTMODE_ENABLED -DTIZEN_MOBILE -DTIZEN_TELEPHONY_ENABLED"
126 %define _servicefile packaging/bluetooth-frwk-mobile.service
127 %define _servicedir multi-user.target.wants
130 %if "%{?profile}" == "wearable"
131 export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
132 %define _servicefile packaging/bluetooth-frwk-wearable.service
133 %define _servicedir multi-user.target.wants
136 %if "%{?profile}" == "tv"
137 export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV -DAUTO_ACCEPT"
138 %define _servicefile packaging/bluetooth-frwk-mobile.service
139 %define _servicedir multi-user.target.wants
143 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC"
145 export CFLAGS="$CFLAGS -fpie"
146 export LDFLAGS="$CFLAGS -pie"
149 export CFLAGS="$CFLAGS -DRFCOMM_DIRECT"
150 export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
152 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
153 -DCMAKE_LIB_DIR=%{_libdir} \
154 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
155 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
156 %if %{with bluetooth_frwk_libnotify}
157 -DLIBNOTIFY_SUPPORT=On \
159 -DLIBNOTIFY_SUPPORT=Off \
161 %if %{with bluetooth_frwk_libnotification}
162 -DLIBNOTIFICATION_SUPPORT=On
164 -DLIBNOTIFICATION_SUPPORT=Off
170 %if "%{?profile}" == "wearable"
171 -DTIZEN_WEARABLE=YES \
173 -DTIZEN_WEARABLE=NO \
175 %if "%{?profile}" == "common"
176 -DTIZEN_WEARABLE=NO \
183 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
184 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
185 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-httpproxy
186 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
188 #mkdir -p %{buildroot}%{_libdir}/systemd/user
189 #install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_libdir}/systemd/user
190 mkdir -p %{buildroot}%{_unitdir}/%{_servicedir}
191 install -m 0644 %{_servicefile} %{buildroot}%{_unitdir}/bluetooth-frwk.service
192 ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/%{_servicedir}/bluetooth-frwk.service
194 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
195 mkdir -p %{buildroot}%{_datadir}/icons/default
196 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
199 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
200 %if "%{profile}"=="ivi"
201 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
207 #%if "%{?profile}" == "wearable"
208 #vconftool set -f -t int db/bluetooth/status "1" -g 6520
210 #%if "%{?profile}" == "mobile"
211 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
213 #%if "%{?profile}" == "common"
214 #vconftool set -f -t int db/bluetooth/status "0" -g 6520
217 #vconftool set -f -t int db/bluetooth/status "0" -s User
218 #vconftool set -f -t int db/bluetooth/lestatus "0" -s User
219 #vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
220 #vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
221 #vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
222 #vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
223 #vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
224 #vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
225 #vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
229 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
230 #ln -sf %{_libdir}/systemd/user/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
232 %postun -p /sbin/ldconfig
235 %manifest %{name}.manifest
236 %defattr(-, root, root)
237 %{_libdir}/libbluetooth-api.so.*
238 %{_datadir}/license/bluetooth-frwk
239 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
240 %{_unitdir}/bluetooth-frwk.service
243 %defattr(-, root, root)
244 %{_includedir}/bt-service/bluetooth-api.h
245 %{_includedir}/bt-service/bluetooth-hid-api.h
246 %{_includedir}/bt-service/bluetooth-audio-api.h
247 %{_includedir}/bt-service/bluetooth-telephony-api.h
248 %{_includedir}/bt-service/bluetooth-media-control.h
249 %{_includedir}/bt-service/bluetooth-scmst-api.h
250 %{_includedir}/bt-service/bluetooth-ipsp-api.h
251 %{_libdir}/pkgconfig/bluetooth-api.pc
252 %{_libdir}/libbluetooth-api.so
253 %{_datadir}/license/bluetooth-frwk-devel
256 %manifest %{name}.manifest
257 %defattr(-, root, root)
258 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
259 %{_bindir}/bt-service
260 #%{_libdir}/systemd/user/bluetooth-frwk-tv.service
261 %{_unitdir}/%{_servicedir}/bluetooth-frwk.service
262 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
263 %{_bindir}/bluetooth-frwk-test
264 #%{_bindir}/bluetooth-gatt-test
265 #%{_bindir}/bluetooth-advertising-test
266 %{_varlibdir}/bluetooth
267 %{_prefix}/etc/bluetooth
268 #%attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
269 #%attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
270 #%{_dumpdir}/bluetooth_log_dump.sh
271 %{_datadir}/license/bluetooth-frwk-service
272 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
273 %{_datadir}/icons/default/bt-icon.png
277 %manifest %{name}.manifest
278 %defattr(-, root, root)
279 %{_bindir}/bt-httpproxy
280 %{_datadir}/license/bluetooth-frwk-httpproxy
281 %{_datadir}/dbus-1/system-services/org.projectx.httpproxy.service
284 %manifest %{name}.manifest
285 %defattr(-, root, root)
286 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
288 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
291 %manifest %{name}.manifest
292 %defattr(-, root, root)
293 %{_bindir}/bluetooth-frwk-test
294 %{_bindir}/bluetooth-gatt-test
295 %{_bindir}/bluetooth-advertising-test