#include <rpmdb.h>
#include <vconf.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#include "librpminternals.h"
-#define BASEDIR "/opt/share"
+#define BASEDIR tzplatform_getenv(TZ_SYS_SHARE)
+#define USER_APP_FOLDER tzplatform_getenv(TZ_USER_APP)
#define BUFFSIZE 256
void pkg_native_plugin_on_unload(void)
}
/*get data_size*/
- snprintf(dirname, BUFFSIZE-1, "/opt/usr/apps/%s/data", pkgid);
+ snprintf(dirname, BUFFSIZE-1, "%s/%s/data", USER_APP_FOLDER, pkgid);
data_size = _librpm_calculate_dir_size(dirname);
if (data_size < 0) {
_librpm_print(DEBUG_ERR,
}
/*get data_size. If pkg is not installed it will be 0*/
- snprintf(dirname, BUFFSIZE-1, "/opt/usr/apps/%s/data",
- pkg_detail_info->pkgid);
+ snprintf(dirname, BUFFSIZE-1, "%s/%s/data",
+ USER_APP_FOLDER, pkg_detail_info->pkgid);
data_size = _librpm_calculate_dir_size(dirname);
if (data_size < 0) {
#include <rpmts.h>
#include <rpmdb.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
/* SLP include files */
#include "rpm-installer.h"
#include "rpm-installer-util.h"
#define QUERY_PACKAGE "/usr/bin/query_rpm_package.sh"
#define RPM_PKG_INFO "/var/rpmpkg.info"
+#define USER_APP_FOLDER tzplatform_getenv(TZ_USER_APP)
struct pkgfile_info_t {
char *pkg_filename;
{
if (pkgid == NULL)
return RPM_INSTALLER_ERR_WRONG_PARAM;
+
char dir_path[256] = { '\0' };
int ret = -1;
- snprintf(dir_path, 255, "/opt/usr/apps/%s/data/", pkgid);
+
+ snprintf(dir_path, 255, "%s/%s/data/", USER_APP_FOLDER, pkgid);
ret = __ri_recursive_delete_dir(dir_path);
+
return ret;
}
Version: 0.1.25
Release: 0
Group: System/Libraries
-License: Apache License, Version 2.0
+License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1001: rpm-installer.manifest
Requires(post): /sbin/ldconfig
BuildRequires: pkgconfig(evas)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(edje)
+BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: gettext-tools
%if %{with x}
BuildRequires: pkgconfig(ecore-x)
%post
mkdir -p /usr/etc/package-manager/backend
mkdir -p /usr/etc/package-manager/backendlib
-ln -sf /usr/bin/rpm-backend /usr/etc/package-manager/backend/rpm
+ln -sf %{_bindir}/rpm-backend /usr/etc/package-manager/backend/rpm
ln -sf /usr/lib/libnativerpm.so /usr/etc/package-manager/backendlib/librpm.so
-chmod 700 /usr/bin/rpm-backend
+chmod 700 %{_bindir}/rpm-backend
vconftool set -t int db/private/rpm-installer/state "0"
vconftool set -t int db/private/rpm-installer/stateinfo "0"
%files
%manifest %{name}.manifest
-%attr(0700,-,-) /usr/bin/rpm-backend
-%attr(0700,-,-) /usr/bin/install_rpm_package.sh
-%attr(0755,-,-) /usr/bin/query_rpm_package.sh
-%attr(0700,-,-) /usr/bin/uninstall_rpm_package.sh
-%attr(0700,-,-) /usr/bin/upgrade_rpm_package.sh
-%attr(0644,-,-) /usr/share/locale/en_GB/LC_MESSAGES/rpm-installer.mo
-%attr(0644,-,-) /usr/share/locale/ja_JP/LC_MESSAGES/rpm-installer.mo
-%attr(0644,-,-) /usr/share/locale/zh_CN/LC_MESSAGES/rpm-installer.mo
-%attr(0644,-,-) /usr/share/locale/en_US/LC_MESSAGES/rpm-installer.mo
-%attr(0644,-,-) /usr/share/locale/ko_KR/LC_MESSAGES/rpm-installer.mo
+%attr(0700,-,-) %{_bindir}/rpm-backend
+%attr(0700,-,-) %{_bindir}/install_rpm_package.sh
+%attr(0755,-,-) %{_bindir}/query_rpm_package.sh
+%attr(0700,-,-) %{_bindir}/uninstall_rpm_package.sh
+%attr(0700,-,-) %{_bindir}/upgrade_rpm_package.sh
+%attr(0644,-,-) %lang(en_GB) /usr/share/locale/en_GB/LC_MESSAGES/rpm-installer.mo
+%attr(0644,-,-) %lang(ja) /usr/share/locale/ja_JP/LC_MESSAGES/rpm-installer.mo
+%attr(0644,-,-) %lang(zh) /usr/share/locale/zh_CN/LC_MESSAGES/rpm-installer.mo
+%attr(0644,-,-) %lang(en_US) /usr/share/locale/en_US/LC_MESSAGES/rpm-installer.mo
+%attr(0644,-,-) %lang(ko) /usr/share/locale/ko_KR/LC_MESSAGES/rpm-installer.mo
%attr(0644,-,-) /usr/lib/libnativerpm.so