usbhost api: remove profile dependency 15/116115/1 accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen_backup_before_upgrade_1.0.21 accepted/tizen/common/20170227.043104 accepted/tizen/ivi/20170227.050114 accepted/tizen/mobile/20170227.050102 accepted/tizen/tv/20170227.050106 accepted/tizen/unified/20170309.040015 accepted/tizen/wearable/20170227.050111 submit/tizen/20170224.082221 submit/tizen_unified/20170308.100414
authortaeyoung <ty317.kim@samsung.com>
Thu, 23 Feb 2017 04:52:12 +0000 (13:52 +0900)
committertaeyoung <ty317.kim@samsung.com>
Thu, 23 Feb 2017 04:52:12 +0000 (13:52 +0900)
- Only Mobile profile supported usb host api until Tizen 3.0
- To remove the profile dependency, usb host api related codes
  are enabled.
  = If usb host api is used, all things are same with Tizen 3.0
  = If libusb is used directly,
    1) root users can access to usb device like Tizen 3.0
    2) normal users cannot open usb device, and thus
       dbus requests to deviced will be triggered.
       If deviced supports usb host api, usb permission popup
       will be launched for the confirmation from user.
       If deviced does not support usb host api, the requests
       are rejected.

Change-Id: Id72a27d5aa78ebaf8006a649c20d88d2c0e6ca65
Signed-off-by: taeyoung <ty317.kim@samsung.com>
packaging/libusb.spec

index 611b690..abdf1d1 100644 (file)
@@ -1,3 +1,5 @@
+%define TIZEN_FEATURE_USBHOST_API on
+
 Name:           libusb
 Version:        1.0.19
 Release:        0
@@ -10,7 +12,7 @@ Source1:        baselibs.conf
 Source1001:    libusb.manifest
 BuildRequires:  pkg-config
 BuildRequires:  systemd-devel
-%if "%{?profile}" == "mobile"
+%if %{?TIZEN_FEATURE_USBHOST_API} == on
 BuildRequires:  pkgconfig(dbus-1)
 %endif
 
@@ -33,7 +35,7 @@ cp %{SOURCE1001} .
 %build
 %reconfigure\
        --with-pic\
-%if "%{?profile}" == "mobile"
+%if %{?TIZEN_FEATURE_USBHOST_API} == on
        --enable-usbhost-api \
 %endif
        --disable-static