Note that offending paths ("/opt/usr/apps") in the file sample.xml were
not removed since this file is neither used nor part of the
generated RPM. As the name of the file suggest it, it simply is a
sample.
Also correct some RPMLINT warnings/errors:
+ set a valid license tag in spec file
+ set a valid group tag in spec file
+ call ldconfig during post install (%post) and post uninstall (%postun)
processes in spec file
Bug-Tizen: PTREL-345
Change-Id: I1b4b00ddcf8d51c98f67e5ae268e0ca0503de176
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
)
FOREACH(flag ${svc_pkgs_CFLAGS})
)
FOREACH(flag ${svc_pkgs_CFLAGS})
#include <com-core.h>
#include <com-core_packet.h>
#include <com-core.h>
#include <com-core_packet.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#include "shortcut.h"
#include "shortcut_internal.h"
#include "shortcut.h"
#include "shortcut_internal.h"
.server_fd = -1,
.client_fd = -1,
.socket_file = "/tmp/.shortcut.service",
.server_fd = -1,
.client_fd = -1,
.socket_file = "/tmp/.shortcut.service",
- .dbfile = "/opt/dbspace/.shortcut_service.db",
.handle = NULL,
.initialized = 0,
.db_opened = 0,
.handle = NULL,
.initialized = 0,
.db_opened = 0,
+ s_info.dbfile = tzplatform_mkpath(TZ_SYS_DB, ".shortcut_service.db");
ret = db_util_open(s_info.dbfile, &s_info.handle, DB_UTIL_REGISTER_HOOK_METHOD);
if (ret != SQLITE_OK) {
DbgPrint("Failed to open a %s\n", s_info.dbfile);
ret = db_util_open(s_info.dbfile, &s_info.handle, DB_UTIL_REGISTER_HOOK_METHOD);
if (ret != SQLITE_OK) {
DbgPrint("Failed to open a %s\n", s_info.dbfile);
-Name: libshortcut
-Summary: Shortcut add feature supporting library
-Version: 0.6.11
-Release: 0
-Group: HomeTF/Framework
-License: Apache
-Source0: %{name}-%{version}.tar.gz
+Name: libshortcut
+Summary: Shortcut add feature supporting library
+Version: 0.6.11
+Release: 0
+Group: Graphics & UI Framework/Libraries
+License: Apache-2.0
+Source0: %{name}-%{version}.tar.gz
Source1001: %{name}.manifest
Source1001: %{name}.manifest
-Requires(post): /sbin/ldconfig
+Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
+Requires: tizen-platform-config-tools
BuildRequires: cmake, gettext-tools, coreutils
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: cmake, gettext-tools, coreutils
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(com-core)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(com-core)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(libtzplatform-config)
%description
[Shortcut] AddToHome feature supporting library for menu/home screen developers.
%description
[Shortcut] AddToHome feature supporting library for menu/home screen developers.
%install
rm -rf %{buildroot}
%make_install
%install
rm -rf %{buildroot}
%make_install
-mkdir -p %{buildroot}/opt/dbspace
-touch %{buildroot}/opt/dbspace/.shortcut_service.db
-touch %{buildroot}/opt/dbspace/.shortcut_service.db-journal
+mkdir -p %{buildroot}%{TZ_SYS_DB}
+touch %{buildroot}%{TZ_SYS_DB}/.shortcut_service.db
+touch %{buildroot}%{TZ_SYS_DB}/.shortcut_service.db-journal
+%post -n libshortcut -p /sbin/ldconfig
+%postun -n libshortcut -p /sbin/ldconfig
%files -n libshortcut
%manifest %{name}.manifest
%files -n libshortcut
%manifest %{name}.manifest
%{_libdir}/*.so*
%{_prefix}/etc/package-manager/parserlib/*
%{_datarootdir}/license/*
%{_libdir}/*.so*
%{_prefix}/etc/package-manager/parserlib/*
%{_datarootdir}/license/*
-%attr(640,root,app) /opt/dbspace/.shortcut_service.db
-%attr(640,root,app) /opt/dbspace/.shortcut_service.db-journal
+%attr(640,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.shortcut_service.db
+%attr(640,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.shortcut_service.db-journal
%files devel
%manifest %{name}.manifest
%files devel
%manifest %{name}.manifest
sqlite3
libxml-2.0
db-util
sqlite3
libxml-2.0
db-util
)
FOREACH(flag ${bin_pkgs_CFLAGS})
)
FOREACH(flag ${bin_pkgs_CFLAGS})
#include <libxml/tree.h>
#include <dlog.h>
#include <libxml/tree.h>
#include <dlog.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#include "dlist.h"
#if !defined(SECURE_LOGD)
#include "dlist.h"
#if !defined(SECURE_LOGD)
const char *dbfile;
sqlite3 *handle;
} s_info = {
const char *dbfile;
sqlite3 *handle;
} s_info = {
- .dbfile = "/opt/dbspace/.shortcut_service.db",
int ret;
struct stat stat;
int ret;
struct stat stat;
+ s_info.dbfile = tzplatform_mkpath(TZ_SYS_DB, ".shortcut_service.db");
ret = db_util_open(s_info.dbfile, &s_info.handle, DB_UTIL_REGISTER_HOOK_METHOD);
if (ret != SQLITE_OK) {
ErrPrint("Failed to open a DB\n");
ret = db_util_open(s_info.dbfile, &s_info.handle, DB_UTIL_REGISTER_HOOK_METHOD);
if (ret != SQLITE_OK) {
ErrPrint("Failed to open a DB\n");
#include <Elementary.h>
#include <shortcut.h>
#include <Elementary.h>
#include <shortcut.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
+#define FILE_PNG tzplatform_mkpath(TZ_SYS_SHARE, "image/what.png")
+
static int result_cb(int ret, int pid, void *data)
{
printf("Client: Return %d (%d)\n", ret, pid);
static int result_cb(int ret, int pid, void *data)
{
printf("Client: Return %d (%d)\n", ret, pid);
- ret = add_to_home_shortcut("pkgname", "MyName", 0, "/usr/bin/true", "/opt/share/image/what.png", result_cb, NULL);
+ ret = add_to_home_shortcut("pkgname", "MyName", 0, "/usr/bin/true", FILE_PNG, result_cb, NULL);
printf("Client: shortcut_add_to_home returns: %d\n", ret);
printf("Client: shortcut_add_to_home returns: %d\n", ret);
- ret = add_to_home_livebox("pkgname", "MyName", 0, "/usr/bin/true", "/opt/share/image/what.png", 1.0f, result_cb, NULL);
+ ret = add_to_home_livebox("pkgname", "MyName", 0, "/usr/bin/true", FILE_PNG, 1.0f, result_cb, NULL);
printf("Client: shortcut_add_to_home_with_period returns: %d\n", ret);
return ECORE_CALLBACK_RENEW;
printf("Client: shortcut_add_to_home_with_period returns: %d\n", ret);
return ECORE_CALLBACK_RENEW;
#include <Elementary.h>
#include <shortcut.h>
#include <Elementary.h>
#include <shortcut.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
+#define USR_SHARE tzplatform_getenv(TZ_USER_SHARE)
+
static int result_cb(struct shortcut_icon *handle, int ret, void *data)
{
printf("Client: Return %d (%p)\n", ret, handle);
static int result_cb(struct shortcut_icon *handle, int ret, void *data)
{
printf("Client: Return %d (%p)\n", ret, handle);
ret = shortcut_icon_request_set_info(handle, NULL, SHORTCUT_ICON_TYPE_TEXT, DEFAULT_NAME_PART, filename, NULL, NULL);
printf("TEXT set_info: %d\n", ret);
ret = shortcut_icon_request_set_info(handle, NULL, SHORTCUT_ICON_TYPE_TEXT, DEFAULT_NAME_PART, filename, NULL, NULL);
printf("TEXT set_info: %d\n", ret);
- snprintf(filename, sizeof(filename), "/opt/usr/share/live_magazine/always/out%d.png", idx);
+ snprintf(filename, sizeof(filename), "%s/live_magazine/always/out%d.png", USR_SHARE, idx);
switch (idx % 7) {
case 0: type = LIVEBOX_TYPE_1x1; break;
switch (idx % 7) {
case 0: type = LIVEBOX_TYPE_1x1; break;
-DBFILE="/opt/dbspace/.shortcut_service.db"
+eval $(tzplatform-get TZ_SYS_DB)
+DBFILE=$TZ_SYS_DB"/.shortcut_service.db"
APPID=(
"org.tizen.facebook"
APPID=(
"org.tizen.facebook"