INCLUDE(FindPkgConfig)
pkg_check_modules(glib_pkg REQUIRED gobject-2.0)
-pkg_check_modules(pkgs REQUIRED glib-2.0 dlog)
+pkg_check_modules(pkgs REQUIRED glib-2.0 dlog libtzplatform-config)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
#include <glib.h>
#include <sys/utsname.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
#include "heynoti-internal.h"
#define AU_PREFIX_SYSNOTI "SYS"
#ifndef NOTI_ROOT
-# define NOTI_ROOT "/opt/share/noti"
+#define NOTI_ROOT tzplatform_mkpath(TZ_SYS_SHARE, "noti")
#endif
};
typedef struct noti_cont ncont;
-static const char *noti_root = NOTI_ROOT;
static GList *g_nc;
static int __make_noti_root(const char *p)
static inline int __make_noti_path(char *path, int size, const char *name)
{
- return snprintf(path, size, "%s/%s", noti_root, name);
+ return snprintf(path, size, "%s/%s", NOTI_ROOT, name);
}
static int __read_proc(const char *path, char *buf, int size)
r = fcntl(fd, F_SETFL, O_NONBLOCK);
util_retvm_if(r < 0, -1, "fcntl error : %s", strerror(errno));
- r = __make_noti_root(noti_root);
+ r = __make_noti_root(NOTI_ROOT);
if (r == -1) {
- UTIL_ERR("make noti root: %s : %s", noti_root, strerror(errno));
+ UTIL_ERR("make noti root: %s : %s", NOTI_ROOT, strerror(errno));
close(fd);
return -1;
}
#include <sys/types.h>
#include <fcntl.h>
+/* For multi-user support */
+#include <tzplatform_config.h>
+
+#define HEYNOTI_PREFIX tzplatform_mkpath(TZ_SYS_SHARE, "noti")
#define BUFSIZE 1024
const int SHARED_PERM = 0666;
const int USER_PERM = 0644;
-const char *HEYNOTI_PREFIX = "/opt/share/noti";
-
static int is_app = FALSE;
static int perm = 0;
-static int user_id = 5000;
static GOptionEntry entries[] = {
-#
-
Name: heynoti
Version: 0.0.2
-Release: 39
-License: Apache License, Version 2.0
+Release: 0
+License: Apache-2.0
Summary: HEY (ligHt Easy speedy) notification library
Group: System/Libraries
Source0: %{name}-%{version}.tar.gz
-Source1001: heynoti.manifest
+Source1001: heynoti.manifest
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(libtzplatform-config)
%description
-lightweight notification library, service APIs
+HEY (ligHt Easy speedy) notification library is a lightweight
+notification library with service APIs.
%package devel
Summary: Notification library
Requires: heynoti
%description devel
-heynoti API (devel)
+Development files for HEY (ligHt Easy speedy) notification library. HEY
+is a lightweight notification library with service APIs.
+
%prep
%setup -q
%install
%make_install
-mkdir -p %{buildroot}/opt/share/noti
+mkdir -p %{buildroot}%{TZ_SYS_SHARE}/noti
%post -p /sbin/ldconfig
%{_libdir}/libheynoti.so.0
%{_libdir}/libheynoti.so.0.0.2
%{_bindir}/heynotitool
-%attr(1755,root,root) /opt/share/noti
+%attr(1755,root,root) %{TZ_SYS_SHARE}/noti
%files devel