IF(LIBNOTIFY_SUPPORT)
ADD_DEFINITIONS("-DLIBNOTIFY_SUPPORT")
ENDIF(LIBNOTIFY_SUPPORT)
+OPTION(MULTI_USER_SUPPORT "Enable multi-user support" OFF)
+IF(MULTI_USER_SUPPORT)
+ ADD_DEFINITIONS("-DMULTI_USER_SUPPORT")
+ENDIF(MULTI_USER_SUPPORT)
ADD_SUBDIRECTORY(bt-api)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${service_pkgs_LDFLAGS})
ENDIF(LIBNOTIFY_SUPPORT)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.projectx.bt.service DESTINATION share/dbus-1/system-services)
+
+IF(NOT MULTI_USER_SUPPORT)
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.projectx.bt.service DESTINATION share/dbus-1/system-services)
+ENDIF(MULTI_USER_SUPPORT)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/auto-pair-blacklist DESTINATION /opt/var/lib/bluetooth)
# install booting script
+IF(NOT MULTI_USER_SUPPORT)
INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-service DESTINATION /etc/rc.d/init.d)
+ENDIF(MULTI_USER_SUPPORT)
-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-service.conf DESTINATION /etc/dbus-1/system.d)
+IF(MULTI_USER_SUPPORT)
+ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-service_user.conf DESTINATION /etc/dbus-1/system.d)
+ELSE(MULTI_USER_SUPPORT)
+ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-service.conf DESTINATION /etc/dbus-1/system.d)
+ENDIF(MULTI_USER_SUPPORT)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
RemainAfterExit=yes
[Install]
-WantedBy=tizen-middleware.target.wants
+WantedBy=tizen-middleware.target
--- /dev/null
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <policy context="default">
+ <allow own="org.projectx.bt"/>
+ <allow own="org.projectx.bt_event"/>
+ </policy>
+ <policy at_console="true">
+ <allow send_destination="org.projectx.bt"/>
+ </policy>
+ <policy context="default">
+ <allow send_destination="org.projectx.bt"/>
+ </policy>
+</busconfig>
+
+* Wed Aug 21 2013 Victor Hakoun <victor.hakoun@eurogiciel.fr> submit/tizen/20130809.082724@2a3c24d
+- Start bt-service with systemd user with multi-user option
+
* Fri Aug 09 2013 Victor Hakoun <victor.hakoun@eurogiciel.fr> submit/tizen/20130809.031242@26a0212
- Add a libnotify/gtk popup system to bluetooth-frwk. This is helping having Bluetooth popups with no OSP application dependencies (bt-syspopup and osp-launcher) and gtk/libnotify on the patform.
%bcond_with bluetooth_frwk_libnotify
+%bcond_with multi_user
Name: bluetooth-frwk
Summary: Bluetooth framework for BlueZ and Obexd
Version: 0.2.57
export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
%endif
%cmake . \
+%if %{with multi_user}
+ -DMULTI_USER_SUPPORT=On \
+%else
+ -DMULTI_USER_SUPPORT=Off \
+%endif
%if %{with bluetooth_frwk_libnotify}
-DLIBNOTIFY_SUPPORT=On
%else
%install
rm -rf %{buildroot}
%make_install
-
-mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d/
-mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d/
-ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S80bluetooth-frwk-service
-ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S80bluetooth-frwk-service
+%if !%{with multi_user}
+ mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d/
+ mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d/
+ ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S80bluetooth-frwk-service
+ ln -s %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S80bluetooth-frwk-service
+%else
+ mv %{buildroot}%{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service_user.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
+%endif
mkdir -p %{buildroot}%{_unitdir_user}
mkdir -p %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants
%files service
%manifest %{name}.manifest
%defattr(-, root, root)
-%{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service
-%{_sysconfdir}/rc.d/rc3.d/S80bluetooth-frwk-service
-%{_sysconfdir}/rc.d/rc5.d/S80bluetooth-frwk-service
-%{_datadir}/dbus-1/system-services/org.projectx.bt.service
+%if !%{with multi_user}
+ %{_datadir}/dbus-1/system-services/org.projectx.bt.service
+ %{_sysconfdir}/rc.d/init.d/bluetooth-frwk-service
+ %{_sysconfdir}/rc.d/rc3.d/S80bluetooth-frwk-service
+ %{_sysconfdir}/rc.d/rc5.d/S80bluetooth-frwk-service
+%endif
%{_bindir}/bt-service
%{_unitdir_user}/tizen-middleware.target.wants/bluetooth-frwk-service.service
%{_unitdir_user}/bluetooth-frwk-service.service