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.
10 Source0: %{name}-%{version}.tar.gz
15 BuildRequires: pkgconfig(aul)
16 BuildRequires: pkgconfig(dbus-glib-1)
17 BuildRequires: pkgconfig(dlog)
18 BuildRequires: pkgconfig(glib-2.0)
19 BuildRequires: pkgconfig(gio-2.0)
20 BuildRequires: pkgconfig(gio-unix-2.0)
21 BuildRequires: pkgconfig(syspopup-caller)
22 BuildRequires: pkgconfig(vconf)
23 BuildRequires: pkgconfig(libxml-2.0)
24 BuildRequires: pkgconfig(dbus-1)
25 BuildRequires: pkgconfig(utilX)
26 BuildRequires: pkgconfig(capi-network-connection)
27 BuildRequires: pkgconfig(alarm-service)
28 BuildRequires: pkgconfig(security-server)
29 BuildRequires: pkgconfig(capi-content-mime-type)
30 BuildRequires: pkgconfig(appcore-efl)
31 BuildRequires: pkgconfig(pkgmgr)
32 BuildRequires: pkgconfig(journal)
33 BuildRequires: pkgconfig(eventsystem)
34 %if "%{?tizen_profile_name}" == "mobile"
35 BuildRequires: pkgconfig(capi-network-tethering)
41 Requires(postun): eglibc
45 Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
46 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
50 Summary: Bluetooth framework for BlueZ and Obexd
52 Requires: %{name} = %{version}-%{release}
55 This package is development files for Bluetooth framework based on BlueZ and Obexd stack.
56 This package contains API set for BT GAP, BT SDP, and BT RFCOMM.
59 Summary: Bluetooth Service daemon
61 Requires: %{name} = %{version}-%{release}
64 This package is Bluetooth Service daemon to manage BT services.
67 Summary: Bluetooth Core daemon
69 Requires: %{name} = %{version}-%{release}
72 This package is Bluetooth core daemon to manage activation / deactivation.
75 Summary: Bluetooth test application
77 Requires: %{name} = %{version}-%{release}
80 This package is Bluetooth test application.
87 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
88 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
89 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
91 %if "%{?tizen_profile_name}" == "mobile"
92 export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE"
95 %if "%{?tizen_profile_name}" == "wearable"
96 export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
97 %define _servicefile packaging/bluetooth-frwk-wearable.service
98 %define _servicedir multi-user.target.wants
100 %define _servicefile packaging/bluetooth-frwk-mobile.service
101 %define _servicedir graphical.target.wants
103 %define _servicedir multi-user.target.wants
105 %if "%{?tizen_profile_name}" == "mobile"
106 export CFLAGS="$CFLAGS -DTIZEN_BT_FLIGHTMODE_ENABLED"
109 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
111 export CFLAGS+=" -fpie -DRFCOMM_DIRECT "
112 cmake . -DCMAKE_INSTALL_PREFIX=/usr
117 %if "%{?tizen_profile_name}" == "wearable"
118 -DTIZEN_WEARABLE=YES \
120 -DTIZEN_WEARABLE=NO \
127 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
128 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
129 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
131 mkdir -p %{buildroot}%{_libdir}/systemd/system/%{_servicedir}
132 install -m 0644 %{_servicefile} %{buildroot}%{_libdir}/systemd/system/bluetooth-frwk.service
133 ln -s ../bluetooth-frwk.service %{buildroot}%{_libdir}/systemd/system/%{_servicedir}/bluetooth-frwk.service
135 mkdir -p %{buildroot}%{_dumpdir}
136 install -m 0755 bluetooth_log_dump.sh %{buildroot}%{_dumpdir}
139 %if "%{?tizen_profile_name}" == "wearable"
140 vconftool set -tf int db/bluetooth/status "1" -g 5000 -s tizen::vconf::public::r::platform::rw
142 vconftool set -tf int db/bluetooth/status "0" -g 5000 -s tizen::vconf::public::r::platform::rw
144 #vconftool set -tf int db/bluetooth/lestatus "0" -g 5000 -s tizen::vconf::public::r::platform::rw
145 #vconftool set -tf int file/private/bt-core/flight_mode_deactivated "0" -g 5000 -i -s tizen::vconf::platform::rw
146 #vconftool set -tf int file/private/bt-core/powersaving_mode_deactivated "0" -g 5000 -i -s tizen::vconf::platform::rw
147 #vconftool set -tf int file/private/bt-service/bt_off_due_to_timeout "0" -g 5000 -i -s tizen::vconf::platform::rw
148 #vconftool set -tf string memory/bluetooth/sco_headset_name "" -g 5000 -i -s tizen::vconf::platform::rw
149 #vconftool set -tf int memory/bluetooth/device "0" -g 5000 -i -s tizen::vconf::platform::rw
150 #vconftool set -tf bool memory/bluetooth/dutmode "0" -g 5000 -i -s tizen::vconf::platform::rw
153 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
154 ln -sf %{_libdir}/systemd/system/bluetooth-frwk.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
156 %postun -p /sbin/ldconfig
159 %defattr(-, root, root)
160 %{_libdir}/libbluetooth-api.so.*
161 %{_datadir}/license/bluetooth-frwk
162 %{_libdir}/systemd/system/%{_servicedir}/bluetooth-frwk.service
163 %{_libdir}/systemd/system/bluetooth-frwk.service
166 %defattr(-, root, root)
167 %{_includedir}/bt-service/bluetooth-api.h
168 %{_includedir}/bt-service/bluetooth-hid-api.h
169 %{_includedir}/bt-service/bluetooth-audio-api.h
170 %{_includedir}/bt-service/bluetooth-telephony-api.h
171 %{_includedir}/bt-service/bluetooth-media-control.h
172 %{_includedir}/bt-service/bluetooth-scmst-api.h
173 %{_libdir}/pkgconfig/bluetooth-api.pc
174 %{_libdir}/libbluetooth-api.so
175 %{_datadir}/license/bluetooth-frwk-devel
178 %manifest bluetooth-frwk.manifest
179 %defattr(-, root, root)
180 %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service
181 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
182 %{_bindir}/bt-service
183 %{_bindir}/bluetooth-frwk-test
184 %{_bindir}/bluetooth-gatt-test
185 %{_bindir}/bluetooth-advertising-test
186 %{_varlibdir}/bluetooth
187 %{_prefix}/etc/bluetooth
188 %attr(0666,-,-) %{_varlibdir}/bluetooth/auto-pair-blacklist
189 %attr(0666,-,-) %{_prefix}/etc/bluetooth/stack_info
190 %{_dumpdir}/bluetooth_log_dump.sh
191 %{_datadir}/license/bluetooth-frwk-service
194 %manifest bluetooth-frwk-core.manifest
195 %defattr(-, root, root)
196 %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
200 %manifest bluetooth-frwk-test.manifest
201 %defattr(-, root, root)
202 %{_bindir}/bluetooth-frwk-test
203 %{_bindir}/bluetooth-gatt-test
204 %{_bindir}/bluetooth-advertising-test