summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>2014-02-10 13:26:55 (GMT)
committerSabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>2014-02-10 13:26:55 (GMT)
commitd4b9f61d4056eeccbcceafd908abe2ac98e0a8ff (patch)
tree8d9807a14c4320b5d926cc8e15cc65b667be59a8
parent3a86573c836fcbe7cb6072e5607b4216c6c5c133 (diff)
downloadui-gadget-1-sandbox/sdi2/multiuser.zip
ui-gadget-1-sandbox/sdi2/multiuser.tar.gz
ui-gadget-1-sandbox/sdi2/multiuser.tar.bz2
Remove hardcoded path for multiuser supportsandbox/sdi2/multiuser
bug-tizen: PTREL-662 Signed-off-by: Sabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>
-rw-r--r--CMakeLists.txt4
-rw-r--r--client/CMakeLists.txt2
-rw-r--r--client/ug-client.c6
-rw-r--r--packaging/ui-gadget-1.spec6
-rw-r--r--src/module.c6
5 files changed, 16 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7733cdf..c665300 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,7 @@ SET(SRCS src/ug.c
ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
-SET(PKGS_CHECK_MODULES "glib-2.0 bundle dlog capi-appfw-application appsvc capi-appfw-app-manager ecore")
+SET(PKGS_CHECK_MODULES "glib-2.0 bundle dlog capi-appfw-application appsvc capi-appfw-app-manager ecore libtzplatform-config")
IF (with_x)
PKG_CHECK_MODULES(PKGS REQUIRED ${PKGS_CHECK_MODULES} utilX x11)
ENDIF(with_x)
@@ -54,7 +54,7 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ui-gadget-module.h DESTINATION
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ui-gadget-engine.h DESTINATION ${INCLUDE_INSTALL_DIR}/ug-1)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ui-gadget.h DESTINATION ${INCLUDE_INSTALL_DIR}/ug-1)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/SLP_UI_Gadget_PG.h DESTINATION ${INCLUDE_INSTALL_DIR}/ug-1)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/ui-gadget-1.rule DESTINATION /opt/etc/smack/accesses.d)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/ui-gadget-1.rule DESTINATION ${TZ_SYS_ETC}/smack/accesses.d)
ADD_SUBDIRECTORY(ug-efl-engine)
ADD_SUBDIRECTORY(client)
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 35f00af..875d87f 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -1,7 +1,7 @@
SET(CLIENT ug-client)
SET(CLIENT_SRCS ug-client.c)
SET(CLIENT_VENDOR samsung)
-SET(CLIENT_DIR /usr/bin)
+SET(CLIENT_DIR ${TZ_SYS_BIN})
SET(CLIENT_LOCALEDIR /usr/share/locale)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/client/ug-client.c b/client/ug-client.c
index 46bd4e7..ecaf16b 100644
--- a/client/ug-client.c
+++ b/client/ug-client.c
@@ -35,10 +35,14 @@
#include "ug-client.h"
+#include <tzplatform_config.h>
+
#ifdef LOG_TAG
#undef LOG_TAG
#endif
+#define PATH_UG_LAUNCHER tzplatform_mkpath(TZ_SYS_BIN,"ug-launcher")
+
#define LOG_TAG "UI_GADGET_CLIENT"
static void prt_usage(const char *cmd)
@@ -439,7 +443,7 @@ int main(int argc, char *argv[])
cmdlen = strlen(argv[0]);
if (strncmp(argv[0], "ug-launcher", cmdlen) == 0
- || strncmp(argv[0], "/usr/bin/ug-launcher", cmdlen) == 0) {
+ || strncmp(argv[0], PATH_UG_LAUNCHER , cmdlen) == 0) {
while ((opt = getopt(argc, argv, "n:d:")) != -1) {
switch (opt) {
case 'n':
diff --git a/packaging/ui-gadget-1.spec b/packaging/ui-gadget-1.spec
index 34335b2..e26a61c 100644
--- a/packaging/ui-gadget-1.spec
+++ b/packaging/ui-gadget-1.spec
@@ -25,6 +25,7 @@ BuildRequires: pkgconfig(capi-system-runtime-info)
BuildRequires: pkgconfig(capi-appfw-app-manager)
BuildRequires: cmake
BuildRequires: edje-bin
+BuildRequires: pkgconfig(libtzplatform-config)
%description
UI gadget library (development headers)
@@ -42,6 +43,7 @@ cp %{SOURCE1001} .
%build
%cmake . \
+-DTZ_SYS_ETC=%TZ_SYS_ETC \
%if %{with wayland} && !%{with x}
-Dwith_wayland=TRUE
%else
@@ -56,7 +58,7 @@ rm -rf %{buildroot}
%post
/sbin/ldconfig
-ln -sf /usr/bin/ug-client /usr/bin/ug-launcher
+ln -sf %{TZ_SYS_BIN}/ug-client %{TZ_SYS_BIN}/ug-launcher
%postun -p /sbin/ldconfig
@@ -68,7 +70,7 @@ ln -sf /usr/bin/ug-client /usr/bin/ug-launcher
/usr/share/edje/ug_effect.edj
%{_bindir}/ug-client
/usr/share/edje/ug-client/*.edj
-/opt/etc/smack/accesses.d/ui-gadget-1.rule
+%{TZ_SYS_ETC}/smack/accesses.d/ui-gadget-1.rule
%files devel
%manifest %{name}.manifest
diff --git a/src/module.c b/src/module.c
index bd2fedc..8307325 100644
--- a/src/module.c
+++ b/src/module.c
@@ -33,6 +33,8 @@
#include "ug-module.h"
#include "ug-dbg.h"
+#include <tzplatform_config.h>
+
#define UG_MODULE_INIT_SYM "UG_MODULE_INIT"
#define UG_MODULE_EXIT_SYM "UG_MODULE_EXIT"
@@ -66,10 +68,10 @@ struct ug_module *ug_module_load(const char *name)
do {
if (pkg_name) {
- snprintf(ug_file, PATH_MAX, "/usr/apps/%s/lib/libug-%s.so", pkg_name, name);
+ snprintf(ug_file, PATH_MAX, "%s/%s/lib/libug-%s.so", tzplatform_getenv(TZ_SYS_RO_APP), pkg_name, name);
if (file_exist(ug_file))
break;
- snprintf(ug_file, PATH_MAX, "/opt/apps/%s/lib/libug-%s.so", pkg_name, name);
+ snprintf(ug_file, PATH_MAX, "%s/%s/lib/libug-%s.so", tzplatform_getenv(TZ_SYS_RO_APP), pkg_name, name);
if (file_exist(ug_file))
break;
}