Merge branch 'tizen_2.2' into tizen accepted/tizen_3.0.2014.q3_common accepted/tizen_3.0.m14.3_ivi accepted/tizen_3.0_ivi accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen_3.0.2014.q3_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common tizen_3.0.m14.2_ivi tizen_3.0.m14.3_ivi tizen_3.0.m1_mobile tizen_3.0.m1_tv tizen_3.0_ivi accepted/tizen/ivi/20160218.023303 submit/tizen_common/20140521.163740 submit/tizen_common/20140522.130648 submit/tizen_common/20140522.135644 submit/tizen_common/20151023.083358 submit/tizen_common/20151026.085049 submit/tizen_ivi/20140618.000000 submit/tizen_ivi/20140618.000001 submit/tizen_ivi/20140619.000000 submit/tizen_ivi/20140622.000000 submit/tizen_ivi/20140623.000000 submit/tizen_ivi/20140624.064036 submit/tizen_ivi/20140626.125712 submit/tizen_ivi/20140626.130032 submit/tizen_ivi/20140626.144348 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000002 submit/tizen_mobile/20141120.000000 tizen_3.0.2014.q3_common_release tizen_3.0.m14.2_ivi_release tizen_3.0.m14.3_ivi_release tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release tizen_3.0_ivi_release
authorInkyun Kil <inkyun.kil@samsung.com>
Fri, 7 Mar 2014 04:40:23 +0000 (13:40 +0900)
committerInkyun Kil <inkyun.kil@samsung.com>
Fri, 7 Mar 2014 04:44:28 +0000 (13:44 +0900)
Conflicts:
packaging/heynoti.spec

CMakeLists.txt
heynoti.c
heynoti.manifest [deleted file]
heynotitool.c
packaging/heynoti.manifest [new file with mode: 0644]
packaging/heynoti.spec

index 5b248b9..c3c5f4d 100755 (executable)
@@ -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)
index bf1f437..aed59d3 100755 (executable)
--- a/heynoti.c
+++ b/heynoti.c
 #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
 
 
@@ -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 (file)
index 97e8c31..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<manifest>
-       <request>
-               <domain name="_"/>
-       </request>
-</manifest>
index dc492c3..4e83102 100755 (executable)
 #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[] = {
diff --git a/packaging/heynoti.manifest b/packaging/heynoti.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
index 891f7d9..d9135ee 100644 (file)
@@ -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