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 Source1002: bt-icon.png
14 URL: https://review.tizen.org/git/?p=platform/core/connectivity/bluetooth-frwk.git;a=summary
17 Requires: bluetooth-tools
18 BuildRequires: pkgconfig(aul)
19 BuildRequires: pkgconfig(dbus-glib-1)
20 BuildRequires: pkgconfig(dlog)
21 BuildRequires: pkgconfig(glib-2.0)
22 BuildRequires: pkgconfig(gio-2.0)
23 BuildRequires: pkgconfig(gio-unix-2.0)
24 %if %{with bluetooth_frwk_libnotify}
25 BuildRequires: pkgconfig(libnotify)
26 BuildRequires: pkgconfig(gdk-pixbuf-2.0)
27 BuildRequires: pkgconfig(gtk+-3.0)
28 %elif %{without bluetooth_frwk_libnotification}
29 BuildRequires: pkgconfig(syspopup-caller)
32 BuildRequires: pkgconfig(syspopup-caller)
34 BuildRequires: pkgconfig(vconf)
35 BuildRequires: pkgconfig(libxml-2.0)
36 BuildRequires: pkgconfig(dbus-1)
38 BuildRequires: pkgconfig(utilX)
40 BuildRequires: pkgconfig(capi-network-connection)
42 BuildRequires: pkgconfig(libprivilege-control)
43 BuildRequires: pkgconfig(status)
44 BuildRequires: pkgconfig(alarm-service)
45 BuildRequires: pkgconfig(notification)
46 BuildRequires: pkgconfig(security-server)
47 BuildRequires: pkgconfig(capi-content-mime-type)
48 BuildRequires: pkgconfig(appcore-efl)
49 BuildRequires: pkgconfig(pkgmgr)
50 #BuildRequires: pkgconfig(journal)
53 BuildRequires: pkgconfig(libtzplatform-config)
55 Requires(post): /usr/bin/vconftool
56 Requires(post): /sbin/ldconfig
57 Requires(postun): /sbin/ldconfig
61 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
62 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
66 Summary: Bluetooth framework for BlueZ and Obexd
67 Group: Development/Libraries
68 Requires: %{name} = %{version}-%{release}
71 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
72 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
75 Summary: Bluetooth Service daemon
76 Group: Network & Connectivity/Bluetooth
77 Requires: %{name} = %{version}-%{release}
80 This package is Bluetooth Service daemon to manage BT services.
83 Summary: Bluetooth Core daemon
84 Group: Network & Connectivity/Bluetooth
85 Requires: %{name} = %{version}-%{release}
89 This package is Bluetooth core daemon to manage activation / deactivation.
92 Summary: Bluetooth test application
93 Group: Network & Connectivity/Bluetooth
94 Requires: %{name} = %{version}-%{release}
97 This package is Bluetooth test application.
105 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
106 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
107 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
110 export CFLAGS+=" -Wall -g -fvisibility=hidden -fPIC -DRFCOMM_DIRECT "
111 export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
113 export CFLAGS+=" -fpie -DRFCOMM_DIRECT "
114 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
118 -DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP \
119 -DTZ_SYS_DEFAULT_USER=%TZ_SYS_DEFAULT_USER \
120 %if %{with bluetooth_frwk_libnotify}
121 -DLIBNOTIFY_SUPPORT=On \
123 -DLIBNOTIFY_SUPPORT=Off \
125 %if %{with bluetooth_frwk_libnotification}
126 -DLIBNOTIFICATION_SUPPORT=On
128 -DLIBNOTIFICATION_SUPPORT=Off
132 %if "%{?tizen_profile_name}" == "wearable"
133 -DTIZEN_WEARABLE=YES \
135 %if "%{?tizen_profile_name}" == "mobile"
136 -DTIZEN_WEARABLE=NO \
138 %if "%{?tizen_profile_name}" == "common"
139 -DTIZEN_WEARABLE=NO \
146 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
147 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
148 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
150 mkdir -p %{buildroot}%{_unitdir_user}
151 install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}
153 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
154 mkdir -p %{buildroot}%{_datadir}/icons/default
155 install -m 0644 %{SOURCE1002} %{buildroot}%{_datadir}/icons/default/bt-icon.png
158 # On IVI bt-service needs to be run as 'app' even if there is a 'guest' user.
159 %if "%{profile}"=="ivi"
160 sed -i 's/%TZ_SYS_DEFAULT_USER/app/' %{buildroot}%{_datadir}/dbus-1/system-services/org.projectx.bt.service
165 %if "%{?tizen_profile_name}" == "wearable"
166 vconftool set -f -t int db/bluetooth/status "1" -g 6520
168 %if "%{?tizen_profile_name}" == "mobile"
169 vconftool set -f -t int db/bluetooth/status "0" -g 6520
171 %if "%{?tizen_profile_name}" == "common"
172 vconftool set -f -t int db/bluetooth/status "0" -g 6520
176 vconftool set -f -t int db/bluetooth/status "0" -s User
177 vconftool set -f -t int db/bluetooth/lestatus "0" -s User
178 vconftool set -f -t int file/private/bt-core/flight_mode_deactivated "0" -s User
179 vconftool set -f -t int file/private/bt-core/powersaving_mode_deactivated "0" -s User
180 vconftool set -f -t int file/private/bt-service/bt_off_due_to_timeout "0" -s User
181 vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
182 vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
183 vconftool set -f -t bool memory/bluetooth/btsco "0" -g 6520 -i
184 vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
187 #mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
188 #ln -sf %{_libdir}/systemd/system/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
190 %postun -p /sbin/ldconfig
193 %manifest %{name}.manifest
194 %defattr(-, root, root)
195 %{_libdir}/libbluetooth-api.so.*
196 %{_datadir}/license/bluetooth-frwk
199 %defattr(-, root, root)
200 %{_includedir}/bt-service/bluetooth-api.h
201 %{_includedir}/bt-service/bluetooth-hid-api.h
202 %{_includedir}/bt-service/bluetooth-audio-api.h
203 %{_includedir}/bt-service/bluetooth-telephony-api.h
204 %{_includedir}/bt-service/bluetooth-media-control.h
205 %{_includedir}/bt-service/bluetooth-scmst-api.h
206 %{_libdir}/pkgconfig/bluetooth-api.pc
207 %{_libdir}/libbluetooth-api.so
208 %{_datadir}/license/bluetooth-frwk-devel
211 %manifest %{name}.manifest
212 %defattr(-, root, root)
213 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
215 %{_bindir}/bt-service
216 %{_unitdir_user}/bluetooth-frwk-service.service
217 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
218 %{_bindir}/bluetooth-frwk-test
219 #%{_bindir}/bluetooth-gatt-test
220 #%{_bindir}/bluetooth-advertising-test
221 %{_varlibdir}/bluetooth
222 %{_prefix}/etc/bluetooth
223 %{_datadir}/license/bluetooth-frwk-service
224 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
225 %{_datadir}/icons/default/bt-icon.png
229 %manifest %{name}.manifest
230 %defattr(-, root, root)
231 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
233 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf
236 %manifest %{name}.manifest
237 %defattr(-, root, root)
238 %{_bindir}/bluetooth-frwk-test
239 #%{_bindir}/bluetooth-gatt-test
240 #%{_bindir}/bluetooth-advertising-test