diff options
author | Kévin THIERRY <kevin.thierry@open.eurogiciel.org> | 2014-01-27 17:17:43 +0100 |
---|---|---|
committer | Kévin THIERRY <kevin.thierry@open.eurogiciel.org> | 2014-02-17 15:28:08 +0100 |
commit | cc94b25aa675fc061d456568f60fe56d536a540f (patch) | |
tree | 9ec37bf1606a85585b9915627494c4eb2d5425e9 | |
parent | bf0ff3aeb217105839faab6e44419671cb2f5116 (diff) | |
download | librua-accepted/tizen/generic.tar.gz librua-accepted/tizen/generic.tar.bz2 librua-accepted/tizen/generic.zip |
Add multi-user supportsubmit/tizen_ivi_release/20140312.071108submit/tizen_ivi_release/20140312.044644submit/tizen/20140312.070642submit/tizen/20140221.195846accepted/tizen/mobile/20140227.071809accepted/tizen/ivi/release/20140312.123836accepted/tizen/ivi/release/20140312.044416accepted/tizen/ivi/panda/20140312.112400accepted/tizen/ivi/20140221.215651accepted/tizen/generic/20140312.094717accepted/tizen/generic/20140221.200118tizen_ivi_releaseaccepted/tizen_ivi_releaseaccepted/tizen_ivi_pandaaccepted/tizen_genericaccepted/tizen/generic
Bug-Tizen: PTREL-339
Change-Id: I1f6145ffaee1ee2fa80b24bb160e6de9251aec18
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | packaging/librua.spec | 11 | ||||
-rw-r--r-- | test/rua-test.c | 5 |
3 files changed, 11 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5110cfb..29acdc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ SET(SRCS INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs REQUIRED sqlite3 db-util) +pkg_check_modules(pkgs REQUIRED sqlite3 db-util libtzplatform-config) FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") diff --git a/packaging/librua.spec b/packaging/librua.spec index dc8621e..b19b615 100644 --- a/packaging/librua.spec +++ b/packaging/librua.spec @@ -1,15 +1,16 @@ Name: librua Version: 0.1.0 -Release: 34 +Release: 0 License: Apache-2.0 Summary: Recently used application Group: Application Framework/Libraries Source0: librua-%{version}.tar.gz -Source1001: librua.manifest +Source1001: librua.manifest BuildRequires: cmake BuildRequires: sqlite3 BuildRequires: pkgconfig(db-util) BuildRequires: pkgconfig(sqlite3) +BuildRequires: pkgconfig(libtzplatform-config) %description Recently used application library @@ -31,8 +32,8 @@ make %{?_smp_mflags} %install %make_install -mkdir -p %{buildroot}/opt/dbspace -sqlite3 %{buildroot}/opt/dbspace/.rua.db < data/rua_db.sql +mkdir -p %{buildroot}%{TZ_SYS_DB} +sqlite3 %{buildroot}%{TZ_SYS_DB}/.rua.db < data/rua_db.sql %post -p /sbin/ldconfig @@ -41,7 +42,7 @@ sqlite3 %{buildroot}/opt/dbspace/.rua.db < data/rua_db.sql %files %manifest %{name}.manifest %defattr(-,root,root,-) -%config(noreplace) %attr(0660,root,app) /opt/dbspace/.rua.db* +%config(noreplace) %attr(0660,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.rua.db* %{_libdir}/librua.so.* %license LICENSE diff --git a/test/rua-test.c b/test/rua-test.c index 6fdd2e0..bcd6913 100644 --- a/test/rua-test.c +++ b/test/rua-test.c @@ -25,6 +25,9 @@ #include <stdlib.h> #include <string.h> +/* For multi-user support */ +#include <tzplatform_config.h> + #include "rua.h" int __add_history(char *pkgname) @@ -33,7 +36,7 @@ int __add_history(char *pkgname) struct rua_rec rec; char apppath[FILENAME_MAX] = ""; - snprintf(apppath, "/opt/apps/%s", pkgname, FILENAME_MAX); + apppath = tzplatform_mkpath(TZ_SYS_RW_APP, pkgname); memset(&rec, 0, sizeof(rec)); rec.pkg_name = pkgname; rec.app_path = apppath; |