Name: bluetooth-frwk
Summary: Bluetooth framework for BlueZ and Obexd
Version: 0.2.55
-Release: 2
+Release: 0
Group: Network & Connectivity/Bluetooth
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(status)
BuildRequires: pkgconfig(alarm-service)
BuildRequires: pkgconfig(notification)
-BuildRequires: pkgconfig(security-server)
BuildRequires: cmake
BuildRequires: pkgconfig(libtzplatform-config)
-Requires(post): vconf
+Requires(post): /usr/bin/vconftool
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Summary: Bluetooth Core daemon
Group: Network & Connectivity/Bluetooth
Requires: %{name} = %{version}-%{release}
+Requires: connman
%description core
This package is Bluetooth core daemon to manage activation / deactivation.
%build
%ifarch x86_64
-export CFLAGS+=" -Wall -g -fvisibility=hidden -fPIC"
-export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
+export CFLAGS="${CFLAGS} -Wall -g -fvisibility=hidden -fPIC"
+export LDFLAGS="${LDFLAGS} -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs"
%else
-export CFLAGS+=" -fpie"
-export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
+export CFLAGS="${CFLAGS} -fpie"
+export LDFLAGS="${LDFLAGS} -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
%endif
%cmake . \
-DLIBNOTIFICATION_SUPPORT=Off
%endif
-make
+%__make
%install
rm -rf %{buildroot}
%make_install
mkdir -p %{buildroot}%{_unitdir_user}
-mkdir -p %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants
install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}
-ln -s ../bluetooth-frwk-service.service %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants/bluetooth-frwk-service.service
%if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
mkdir -p %{buildroot}%{_datadir}/icons/default
%post
/sbin/ldconfig
-vconftool set -tf int db/bluetooth/status "0" -g 6520
-vconftool set -tf int file/private/bt-service/flight_mode_deactivated "0" -g 6520 -i
-vconftool set -tf string memory/bluetooth/sco_headset_name "" -g 6520 -i
-vconftool set -tf int memory/bluetooth/device "0" -g 6520 -i
-vconftool set -tf int memory/bluetooth/btsco "0" -g 6520 -i
+vconftool set -f -t int db/bluetooth/status "0" -g 6520
+vconftool set -f -t int file/private/bt-service/flight_mode_deactivated "0" -g 6520 -i
+vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520 -i
+vconftool set -f -t int memory/bluetooth/device "0" -g 6520 -i
+vconftool set -f -t int memory/bluetooth/btsco "0" -g 6520 -i
+# set 'User' smack label to vconf keys in order to allow bt-service to access them.
+chsmack -a 'User' %TZ_SYS_CONFIG/db/bluetooth/status
+chsmack -a 'User' %TZ_SYS_CONFIG/file/private/bt-service/flight_mode_deactivated
+chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/sco_headset_name
+chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/device
+chsmack -a 'User' %TZ_SYS_CONFIG/memory_init/memory/bluetooth/btsco
%postun -p /sbin/ldconfig
%{_datadir}/dbus-1/system-services/org.projectx.bt.service
%{_bindir}/bt-service
-%{_unitdir_user}/tizen-middleware.target.wants/bluetooth-frwk-service.service
%{_unitdir_user}/bluetooth-frwk-service.service
%attr(0666,-,-) /opt/var/lib/bluetooth/auto-pair-blacklist
%{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf