build: added support for multiuser architecture.
authorIsmo Puustinen <ismo.puustinen@intel.com>
Thu, 28 Aug 2014 03:26:34 +0000 (06:26 +0300)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:15 +0000 (18:37 +0200)
This is done with the help of tizen-platform-config package.

Change-Id: I432f1a6538a8b7efcdc8b7dcecf1c00befaef253

configure.ac
packaging.in/org.Murphy.conf.in [moved from packaging.in/org.Murphy.conf with 70% similarity]
packaging/murphy.spec
src/Makefile.am

index 5fa922b..467a349 100644 (file)
@@ -497,6 +497,17 @@ AC_SUBST(AUL_ENABLED)
 AC_SUBST(AUL_CFLAGS)
 AC_SUBST(AUL_LIBS)
 
+PKG_CHECK_MODULES(TZCONFIG, libtzplatform-config,
+           [have_tzconfig=yes], [have_tzconfig=no])
+enable_tzconfig="$have_tzconfig"
+if test "$enable_tzconfig" = "yes"; then
+    AC_DEFINE([TZCONFIG_ENABLED], 1, [Enable Tizen configuration support ?])
+fi
+AM_CONDITIONAL(TZCONFIG_ENABLED, [test "$enable_tzconfig" = "yes"])
+AC_SUBST(TZCONFIG_ENABLED)
+AC_SUBST(TZCONFIG_CFLAGS)
+AC_SUBST(TZCONFIG_LIBS)
+
 # Check if system-controller (plugin) support should be enabled.
 AC_ARG_ENABLE(system-controller,
               [  --enable-system-controller enable system-controller support],
@@ -810,7 +821,7 @@ fi
 AC_CONFIG_FILES([build-aux/shave
                 build-aux/shave-libtool
                 Makefile
-                 utils/Makefile
+                utils/Makefile
                 src/Makefile
                 src/common/tests/Makefile
                 src/core/tests/Makefile
@@ -824,10 +835,10 @@ AC_CONFIG_FILES([build-aux/shave
                 src/common/murphy-pulse.pc
                 src/common/murphy-ecore.pc
                 src/common/murphy-glib.pc
-                 src/common/murphy-qt.pc
+                src/common/murphy-qt.pc
                 src/core/murphy-core.pc
-                 src/core/lua-utils/murphy-lua-utils.pc
-                 src/core/lua-decision/murphy-lua-decision.pc
+                src/core/lua-utils/murphy-lua-utils.pc
+                src/core/lua-decision/murphy-lua-decision.pc
                 src/breedline/breedline.pc
                 src/breedline/breedline-murphy.pc
                 src/breedline/breedline-glib.pc
@@ -847,6 +858,7 @@ AC_CONFIG_FILES([build-aux/shave
                 doc/plugin-developer-guide/db/Makefile
                 doc/plugin-developer-guide/doxml/Makefile
                 src/plugins/resource-native/libmurphy-resource/murphy-resource.pc
+                packaging.in/org.Murphy.conf
                 ])
 AC_OUTPUT
 
similarity index 70%
rename from packaging.in/org.Murphy.conf
rename to packaging.in/org.Murphy.conf.in
index e52f756..fa6ac40 100644 (file)
@@ -3,12 +3,7 @@
         "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 
 <busconfig>
-        <policy user="root">
-                <allow own="org.Murphy"/>
-                <allow receive_sender="org.Murphy"/>
-                <allow send_destination="org.Murphy"/>
-        </policy>
-        <policy user="app">
+        <policy group="@TZ_SYS_USER_GROUP@">
                 <allow own="org.Murphy"/>
                 <allow receive_sender="org.Murphy"/>
                 <allow send_destination="org.Murphy"/>
index e1897e9..3953d9a 100644 (file)
@@ -75,6 +75,7 @@ BuildRequires: pkgconfig(lua)
 BuildRequires: pkgconfig(libsystemd-daemon)
 BuildRequires: pkgconfig(libsystemd-journal)
 BuildRequires: pkgconfig(libcap)
+BuildRequires: pkgconfig(libtzplatform-config)
 
 %if %{?_with_pulse:1}%{!?_with_pulse:0}
 BuildRequires: pkgconfig(libpulse)
@@ -461,6 +462,7 @@ cp packaging.in/murphy-wait-for-launchpad-ready.path $RPM_BUILD_ROOT%{systemddir
 
 %if %{?_with_dbus:1}%{!?_with_dbus:0}
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d
+sed "s/@TZ_SYS_USER_GROUP@/%{TZ_SYS_USER_GROUP}/g" packaging.in/org.Murphy.conf.in > packaging.in/org.Murphy.conf
 cp packaging.in/org.Murphy.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/org.Murphy.conf
 %endif
 
index f0266be..6593352 100644 (file)
@@ -1333,12 +1333,14 @@ PLUGIN_IVI_RESOURCE_MANAGER_REGULAR_SOURCES =                               \
 PLUGIN_IVI_RESOURCE_MANAGER_SOURCES =                                      \
                $(PLUGIN_IVI_RESOURCE_MANAGER_REGULAR_SOURCES)
 PLUGIN_IVI_RESOURCE_MANAGER_CFLAGS =                                       \
-               $(LUA_CFLAGS)
+               $(LUA_CFLAGS)                                                                           \
+               $(TZCONFIG_CFLAGS)
 
 PLUGIN_IVI_RESOURCE_MANAGER_LIBS =                                         \
-               libmurphy-common.la                                         \
+               libmurphy-common.la                                                                     \
                $(RESOURCE_LIBRARY)                                         \
-               $(LUA_LIBS)
+               $(LUA_LIBS)                                                                             \
+               $(TZCONFIG_LIBS)
 
 plugin_ivi_resource_manager_la_SOURCES = $(PLUGIN_IVI_RESOURCE_MANAGER_SOURCES)
 plugin_ivi_resource_manager_la_CFLAGS  = $(PLUGIN_IVI_RESOURCE_MANAGER_CFLAGS)\
@@ -1546,7 +1548,7 @@ SYSTEMCTL_PLUGIN_CFLAGS  = \
                         -I$(top_builddir)/src/$(SYSTEMCTL_DIR)
 SYSTEMCTL_PLUGIN_LIBS    = \
                        $(WEBSOCKET_LIBS) $(WAYLAND_CLIENT_LIBS) $(LIBXML2_LIBS) $(AUL_LIBS) \
-                       $(AIL_CFLAGS) -lico-uxf-weston-plugin
+                       $(AIL_CFLAGS) -lico-uxf-weston-plugin $(TZCONFIG_LIBS)
 
 SYSTEMCTL_PLUGIN_LOADER  = linkedin-system-controller-loader.c
 
@@ -1566,7 +1568,8 @@ libmurphy_plugin_system_controller_la_SOURCES =                           \
 
 libmurphy_plugin_system_controller_la_CFLAGS =                         \
                $(SYSTEMCTL_PLUGIN_CFLAGS)                              \
-               $(AM_CFLAGS)
+               $(AM_CFLAGS)                                            \
+               $(TZCONFIG_CFLAGS)
 
 libmurphy_plugin_system_controller_la_LDFLAGS =                                \
                -Wl,-version-script=linker-script.system-controller     \