AC_ARG_ENABLE(launchd, AS_HELP_STRING([--enable-launchd],[build with launchd auto-launch support]),enable_launchd=$enableval,enable_launchd=auto)
AC_ARG_ENABLE(systemd, AS_HELP_STRING([--enable-systemd],[build with systemd at_console support]),enable_systemd=$enableval,enable_systemd=auto)
AC_ARG_ENABLE(kdbus-transport, AS_HELP_STRING([--enable-kdbus-transport],[build with kdbus transport support]),enable_kdbus_transport=$enableval,enable_kdbus_transport=no)
+AC_ARG_ENABLE(kdbus-for-sbb, AS_HELP_STRING([--enable-kdbus-for-sbb],[build with kdbus sbb support]),enable_kdbus_for_sbb=$enableval,enable_kdbus_for_sbb=no)
AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install]))
AC_ARG_WITH(session-socket-dir, AS_HELP_STRING([--with-session-socket-dir=[dirname]],[Where to put sockets for the per-login-session message bus]))
AM_CONDITIONAL([ENABLE_KDBUS_TRANSPORT], [test x$enable_kdbus_transport = xyes])
+### sbb support
+if test x$enable_kdbus_for_sbb = xyes; then
+ KDBUS_LIBS=
+ #"-lcrypto"
+ #AC_SUBST([KDBUS_LIBS])
+ AC_DEFINE(KDBUS_FOR_SBB,1,[Enable SBB support])
+else
+ KDBUS_LIBS=
+fi
+
+AM_CONDITIONAL([ENABLE_KDBUS_FOR_SBB], [test x$enable_kdbus_for_sbb = xyes])
+
#### Set up final flags
LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs $KDBUS_LIBS"
AC_SUBST([LIBDBUS_LIBS])
Building XML docs: ${enable_xml_docs}
Building cache support: ${enable_userdb_cache}
Building launchd support: ${have_launchd}
- Building kdbus support: ${enable_kdbus_transport}
+ Building kdbus support: ${enable_kdbus_transport}
+ Building kdbus for sbb: ${enable_kdbus_for_sbb}
Init scripts style: ${with_init_scripts}
Abstract socket names: ${ac_cv_have_abstract_sockets}
System bus socket: ${DBUS_SYSTEM_SOCKET}
Console auth dir: ${DBUS_CONSOLE_AUTH_DIR}
Console owner file: ${have_console_owner_file}
Console owner file path: ${DBUS_CONSOLE_OWNER_FILE}
- System bus user: ${DBUS_USER}
- Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services
+ System bus user: ${DBUS_USER}
+ Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services
'make check' socket dir: ${TEST_SOCKET_DIR}
"
if test x$have_launchd = xyes; then
Source2: dbus-user.socket
Source3: dbus-user.service
Source4: system.conf
+Source5: switch-to-dbus.sh
+Source6: switch-to-kdbus.sh
+Source7: conf_dbus.tar.gz
+Source8: conf_kdbus.tar.gz
BuildRequires: which
BuildRequires: expat-devel
BuildRequires: libtool
%build
./autogen.sh --enable-abstract-sockets --enable-x11-autolaunch --with-x \
--enable-kdbus-transport \
+ --enable-kdbus-for-sbb \
--disable-static \
--exec-prefix=/ \
--bindir=%{_bindir} \
install -m0644 %{SOURCE2} %{buildroot}%{_libdir}/systemd/user/dbus.socket
install -m0644 %{SOURCE3} %{buildroot}%{_libdir}/systemd/user/dbus.service
+install -m0755 %{SOURCE5} %{buildroot}%{_bindir}/switch-to-dbus.sh
+install -m0755 %{SOURCE6} %{buildroot}%{_bindir}/switch-to-kdbus.sh
+
+tar -xvzf %{SOURCE7} -C %{buildroot}/etc/dbus-1
+tar -xvzf %{SOURCE8} -C %{buildroot}/etc/dbus-1
+
%post
mkdir -p /opt/var/lib/dbus
%{_libdir}/systemd/user/*
%dir %{_datadir}/dbus-1
%{_datadir}/dbus-1/interfaces
+%{_bindir}/switch-to-dbus.sh
+%{_bindir}/switch-to-kdbus.sh
+%{_sysconfdir}/dbus-1/conf_dbus
+%{_sysconfdir}/dbus-1/conf_kdbus
%files libs
%{_libdir}/libdbus-1.so.3*
--- /dev/null
+#!/bin/sh
+
+CONF_DIR_PATH="/etc/dbus-1/conf_dbus"
+
+echo "copying legacy dbus modified service files..."
+rm /usr/lib/systemd/system/graphical.target.wants/xorg.target 2>/dev/null
+rm -rf /usr/lib/systemd/system/xorg* 2>/dev/null
+rm /usr/lib/systemd/user/tizen-middleware.target.wants/dbus.service 2>/dev/null
+ln -s /usr/lib/systemd/user/xorg.service /usr/lib/systemd/user/xorg.target.wants/
+ln -s /usr/lib/systemd/user/xorg_done.service /usr/lib/systemd/user/xorg.target.wants/
+cp -a $CONF_DIR_PATH/* /
+if [ "$?" -ne 0 ]; then
+ echo "error occured on copying!"
+else
+ echo "syncing..."
+ sync
+ echo "now reset and flash the kernel not using kdbus"
+fi