1 %define _dumpdir /opt/etc/dump.d/module.d
2 %define _varlibdir /opt/var/lib
5 Summary: Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
8 Group: Network & Connectivity/Bluetooth
9 License: Apache License, Version 2.0
10 Source0: %{name}-%{version}.tar.gz
11 Source1001: bluetooth-frwk.manifest
12 URL: https://review.tizen.org/git/?p=platform/core/connectivity/bluetooth-frwk.git;a=summary
16 BuildRequires: pkgconfig(aul)
17 BuildRequires: pkgconfig(dbus-glib-1)
18 BuildRequires: pkgconfig(dlog)
19 BuildRequires: pkgconfig(glib-2.0)
20 BuildRequires: pkgconfig(gio-2.0)
21 BuildRequires: pkgconfig(gio-unix-2.0)
22 BuildRequires: pkgconfig(syspopup-caller)
23 BuildRequires: pkgconfig(vconf)
24 BuildRequires: pkgconfig(libxml-2.0)
25 BuildRequires: pkgconfig(dbus-1)
26 BuildRequires: pkgconfig(utilX)
27 BuildRequires: pkgconfig(capi-network-connection)
28 BuildRequires: pkgconfig(alarm-service)
29 BuildRequires: pkgconfig(notification)
30 BuildRequires: pkgconfig(security-server)
31 BuildRequires: pkgconfig(capi-content-mime-type)
32 BuildRequires: pkgconfig(appcore-efl)
33 BuildRequires: pkgconfig(pkgmgr)
34 #BuildRequires: pkgconfig(journal)
36 %if "%{?tizen_profile_name}" == "mobile"
37 BuildRequires: pkgconfig(capi-network-tethering)
42 #Requires(post): vconf
43 #Requires(postun): eglibc
45 Requires(post): /usr/bin/vconftool
46 Requires(post): /sbin/ldconfig
47 Requires(postun): /sbin/ldconfig
48 Requires(postun): eglibc
52 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
53 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
57 Summary: Bluetooth framework for BlueZ and Obexd
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
62 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
63 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
66 Summary: Bluetooth Service daemon
67 Group: Network & Connectivity/Bluetooth
68 Requires: %{name} = %{version}-%{release}
71 This package is Bluetooth Service daemon to manage BT services.
74 Summary: Bluetooth Core daemon
75 Group: Network & Connectivity/Bluetooth
76 Requires: %{name} = %{version}-%{release}
79 This package is Bluetooth core daemon to manage activation / deactivation.
82 Summary: Bluetooth test application
83 Group: Network & Connectivity/Bluetooth
84 Requires: %{name} = %{version}-%{release}
87 This package is Bluetooth test application.
95 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
96 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
97 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
99 %if "%{?tizen_profile_name}" == "mobile"
100 export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE"
103 %if "%{?tizen_profile_name}" == "wearable"
104 export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
105 %define _servicefile packaging/bluetooth-frwk-wearable.service
107 %define _servicefile packaging/bluetooth-frwk-mobile.service
109 %define _servicedir multi-user.target.wants
111 %if "%{?tizen_profile_name}" == "mobile"
113 export CFLAGS="$CFLAGS -DTIZEN_TELEPHONY_ENABLED"
116 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
118 export CFLAGS+=" -fpie -DRFCOMM_DIRECT "
119 cmake . -DCMAKE_INSTALL_PREFIX=/usr
124 %if "%{?tizen_profile_name}" == "wearable"
125 -DTIZEN_WEARABLE=YES \
127 -DTIZEN_WEARABLE=NO \
134 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
135 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
136 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
138 mkdir -p %{buildroot}%{_libdir}/systemd/system/%{_servicedir}
139 install -m 0644 %{_servicefile} %{buildroot}%{_libdir}/systemd/system/bluetooth-frwk.service
140 ln -s ../bluetooth-frwk.service %{buildroot}%{_libdir}/systemd/system/%{_servicedir}/bluetooth-frwk.service
142 mkdir -p %{buildroot}%{_dumpdir}
143 install -m 0755 bluetooth_log_dump.sh %{buildroot}%{_dumpdir}
146 %if "%{?tizen_profile_name}" == "wearable"
147 vconftool set -tf int db/bluetooth/status "1" -g 5000 -s tizen::vconf::public::r::platform::rw
149 vconftool set -tf int db/bluetooth/status "0" -g 5000 -s tizen::vconf::public::r::platform::rw
151 vconftool set -tf int db/bluetooth/lestatus "0" -g 5000 -s tizen::vconf::public::r::platform::rw
152 vconftool set -tf int file/private/bt-core/flight_mode_deactivated "0" -g 5000 -i -s tizen::vconf::platform::rw
153 vconftool set -tf int file/private/bt-core/powersaving_mode_deactivated "0" -g 5000 -i -s tizen::vconf::platform::rw
154 vconftool set -tf int file/private/bt-service/bt_off_due_to_timeout "0" -g 5000 -i -s tizen::vconf::platform::rw
155 vconftool set -tf string memory/bluetooth/sco_headset_name "" -g 5000 -i -s tizen::vconf::platform::rw
156 vconftool set -tf int memory/bluetooth/device "0" -g 5000 -i -s tizen::vconf::platform::rw
157 vconftool set -tf bool memory/bluetooth/dutmode "0" -g 5000 -i -s tizen::vconf::platform::rw
160 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
161 ln -sf %{_libdir}/systemd/system/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
163 %postun -p /sbin/ldconfig
166 %manifest %{name}.manifest
167 %defattr(-, root, root)
168 %{_libdir}/libbluetooth-api.so.*
169 %{_datadir}/license/bluetooth-frwk
170 %{_libdir}/systemd/system/%{_servicedir}/bluetooth-frwk.service
171 %{_libdir}/systemd/system/bluetooth-frwk.service
174 %defattr(-, root, root)
175 %{_includedir}/bt-service/bluetooth-api.h
176 %{_includedir}/bt-service/bluetooth-hid-api.h
177 %{_includedir}/bt-service/bluetooth-audio-api.h
178 %{_includedir}/bt-service/bluetooth-telephony-api.h
179 %{_includedir}/bt-service/bluetooth-media-control.h
180 %{_includedir}/bt-service/bluetooth-scmst-api.h
181 %{_libdir}/pkgconfig/bluetooth-api.pc
182 %{_libdir}/libbluetooth-api.so
183 %{_datadir}/license/bluetooth-frwk-devel
186 %manifest %{name}.manifest
187 %defattr(-, root, root)
188 %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service
189 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
190 %{_bindir}/bt-service
191 %{_bindir}/bluetooth-frwk-test
192 %{_bindir}/bluetooth-gatt-test
193 %{_bindir}/bluetooth-advertising-test
194 %{_varlibdir}/bluetooth
195 %{_prefix}/etc/bluetooth
196 %attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
197 %attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
198 %{_dumpdir}/bluetooth_log_dump.sh
199 %{_datadir}/license/bluetooth-frwk-service
202 %manifest %{name}.manifest
203 %defattr(-, root, root)
204 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
208 %manifest %{name}.manifest
209 %defattr(-, root, root)
210 %{_bindir}/bluetooth-frwk-test
211 %{_bindir}/bluetooth-gatt-test
212 %{_bindir}/bluetooth-advertising-test