Add multi-user support 48/16448/2 accepted/tizen/generic accepted/tizen/ivi/stable accepted/tizen_generic accepted/tizen_ivi_panda accepted/tizen_ivi_release tizen_3.0.m14.2_ivi tizen_ivi_release accepted/tizen/generic/20140220.133014 accepted/tizen/generic/20140312.095042 accepted/tizen/ivi/20140219.194205 accepted/tizen/ivi/panda/20140312.111813 accepted/tizen/ivi/release/20140312.123748 accepted/tizen/mobile/20140227.071622 submit/tizen/20140219.090551 submit/tizen/20140312.070654 submit/tizen_ivi_release/20140312.071128 tizen_3.0.m14.2_ivi_release
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Mon, 20 Jan 2014 14:25:52 +0000 (15:25 +0100)
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Wed, 19 Feb 2014 07:53:01 +0000 (08:53 +0100)
Bug-Tizen: PTREL-371
Change-Id: Id96c88b2d5384e197ee74fdffa711f7c6120e462
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
packaging/bluetooth-tools.spec
scripts/bt-dev-start.sh
scripts/bt-reset-env.sh
scripts/bt-stack-up.sh

index 84779c2..6495f86 100644 (file)
@@ -1,14 +1,15 @@
 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
@@ -17,7 +18,7 @@ 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
@@ -30,7 +31,7 @@ On/Off bluetooth device
 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
index dcd72f7..a0e513a 100755 (executable)
@@ -3,7 +3,7 @@
 # Script for registering BT device
 BT_PLATFORM_DEFAULT_HCI_NAME="Tizen"
 
-# Trun-on Bluetooth Chip
+# Turn-on Bluetooth Chip
 
 /usr/sbin/rfkill unblock bluetooth
 
index 4532357..1ce9fa9 100755 (executable)
@@ -6,7 +6,8 @@
 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
index 1e934a1..b48d955 100644 (file)
@@ -8,7 +8,7 @@
 /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
 
@@ -17,9 +17,9 @@ echo "Run bluetoothd"
 
 # 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