From: Inkyun Kil Date: Fri, 7 Mar 2014 04:40:23 +0000 (+0900) Subject: Merge branch 'tizen_2.2' into tizen X-Git-Tag: accepted/tizen/ivi/20160218.023303^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_3.0.2015.q1_common;hp=6060be6994a7a5e46790f0187f023b5dad18429a;p=platform%2Fcore%2Fappfw%2Fheynoti.git Merge branch 'tizen_2.2' into tizen Conflicts: packaging/heynoti.spec --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b248b9..c3c5f4d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) 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) diff --git a/heynoti.c b/heynoti.c index bf1f437..aed59d3 100755 --- a/heynoti.c +++ b/heynoti.c @@ -37,12 +37,15 @@ #include #include +/* For multi-user support */ +#include + #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 @@ -106,7 +109,6 @@ struct noti_cont { }; typedef struct noti_cont ncont; -static const char *noti_root = NOTI_ROOT; static GList *g_nc; static int __make_noti_root(const char *p) @@ -135,7 +137,7 @@ static int __make_noti_file(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) @@ -545,9 +547,9 @@ API int heynoti_init() 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; } diff --git a/heynoti.manifest b/heynoti.manifest deleted file mode 100644 index 97e8c31..0000000 --- a/heynoti.manifest +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/heynotitool.c b/heynotitool.c index dc492c3..4e83102 100755 --- a/heynotitool.c +++ b/heynotitool.c @@ -34,17 +34,18 @@ #include #include +/* For multi-user support */ +#include + +#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[] = { diff --git a/packaging/heynoti.manifest b/packaging/heynoti.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/heynoti.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/heynoti.spec b/packaging/heynoti.spec index 891f7d9..d9135ee 100644 --- a/packaging/heynoti.spec +++ b/packaging/heynoti.spec @@ -1,20 +1,21 @@ -# - Name: heynoti Version: 0.0.2 -Release: 41 -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 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 @@ -23,10 +24,13 @@ Requires: %{name} = %{version} 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 +cp %{SOURCE1001} . %build @@ -37,9 +41,10 @@ make %{?_smp_mflags} %install %make_install + +mkdir -p %{buildroot}%{TZ_SYS_SHARE}/noti mkdir -p %{buildroot}/usr/share/license install LICENSE %{buildroot}/usr/share/license/%{name} -mkdir -p %{buildroot}/opt/share/noti %post -p /sbin/ldconfig @@ -47,16 +52,17 @@ mkdir -p %{buildroot}/opt/share/noti %files -%manifest heynoti.manifest +%manifest %{name}.manifest %defattr(-,root,root,-) %{_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 /usr/share/license/%{name} %files devel +%manifest %{name}.manifest %defattr(-,root,root,-) %{_includedir}/heynoti/SLP_Heynoti_PG.h %{_includedir}/heynoti/heynoti.h