#define __PKGMGR_DBINFO_H__
#include <stdbool.h>
+#include <tzplatform_config.h>
-#define GLOBAL_USER 0 //@TODO tzpl
+#define GLOBAL_USER tzplatform_getuid(TZ_SYS_GLOBALAPP_USER)
#ifdef __cplusplus
extern "C" {
#include <sys/time.h>
#include <ail.h>
#include <aul.h>
+#include <tzplatform_config.h>
#include "package-manager.h"
#include <pkgmgr-info.h>
#define LOG_TAG "PKGMGR"
#endif /* LOG_TAG */
-#define GLOBAL_USER 0 //#define tzplatform_getenv(TZ_GLOBAL) //TODO
+#define GLOBAL_USER tzplatform_getuid(TZ_SYS_GLOBALAPP_USER)
#define IS_WHITESPACE(CHAR) \
((CHAR == ' ' || CHAR == '\t' || CHAR == '\r' || CHAR == '\n') ? \
#define BINSH_NAME "/bin/sh"
#define BINSH_SIZE 7
-#define GLOBAL_USER 0 //#define tzplatform_getenv(TZ_GLOBAL) //TODO
+#define GLOBAL_USER tzplatform_getuid(TZ_SYS_GLOBALAPP_USER)
static int _get_request_id()
{
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgmgr-info-parser-devel
BuildRequires: pkgmgr-info-parser
+Requires: pwdutils
%description
Packager Manager client library package for packaging
%find_lang package-manager
-
%post
/sbin/ldconfig
# Update mime database to support package mime types
update-mime-database /usr/share/mime
+# Create tizenglobalapp user needed for global installation
+%{_sbindir}/useradd -d %TZ_SYS_RW_APP -m %TZ_SYS_GLOBALAPP_USER -r -c "system user for common applications" -g users
+#mkdir -p %TZ_SYS_RW_APP/.config/xwalk-service/applications
+#cd %TZ_SYS_RW_APP/
+#ln -s .config/xwalk-service/applications/
+
%post -n pkgmgr-server -p /sbin/ldconfig
%post -n pkgmgr-client -p /sbin/ldconfig