Name: bluetooth-tools
Summary: Bluetooth-tools
Version: 0.2.35
-Release: 3
+Release: 0
Group: Network & Connectivity/Bluetooth
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
-Source1001: bluetooth-address.service
+Source1001: bluetooth-address.service
BuildRequires: cmake
-Requires: bluetooth-tools-no-firmware
Suggests: bluetooth-share
+Requires: tizen-platform-config-tools
+Requires : bluetooth-tools-no-firmware
%description
Tools fo bluetooth run/stop and set address
Summary: On/Off Bluetooth adapter
Group: Network & Connectivity/Bluetooth
Requires: %{name} = %{version}-%{release}
-Requires: rfkill
+Requires: rfkill
Conflicts: bluetooth-firmware-bcm
%description no-firmware
export CFLAGS+=" -fpie -fvisibility=hidden"
export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
make %{?jobs:-j%jobs}
%install
# Script for registering BT device
BT_PLATFORM_DEFAULT_HCI_NAME="Tizen"
-# Trun-on Bluetooth Chip
+# Turn-on Bluetooth Chip
/usr/sbin/rfkill unblock bluetooth
killall -9 hciattach
# Remove BT files and setting
-rm -rf /opt/data/bluetooth/.bt_paired
+eval $(tzplatform-get TZ_SYS_DATA)
+rm -rf $TZ_SYS_DATA/bluetooth/.bt_paired
rm -rf /var/lib/bluetooth/*
# Initialize BT vconf values
/usr/etc/bluetooth/bt-dev-start.sh
if !(/usr/bin/hciconfig | grep hci); then
- echo "Registering BT device is failed."
+ echo "Registering BT device failed."
exit 1
fi
# We have to handle both systemd and sysvinit cases differently
if [ -d /sys/fs/cgroup/systemd ]; then
- # bt-service changes USER to 'app' via libprivilege-control, so it needs
+ # bt-service changes USER via libprivilege-control, so it needs
# to know where the session bus is located under systemd
- export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket
+ export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/dbus/user_bus_socket
else
# Under systemd, bluetoothd is dbus activated. sysvinit requires it to be
# launched explicitly