update for beta universally
[apps/home/notification.git] / packaging / notification.spec
1 Name:       notification
2 Summary:    notification library
3 Version:    0.1.1
4 Release:    4.11
5 Group:      System/Library
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 BuildRequires: pkgconfig(sqlite3)
9 BuildRequires: pkgconfig(appsvc)
10 BuildRequires: pkgconfig(db-util)
11 BuildRequires: pkgconfig(heynoti)
12 BuildRequires: pkgconfig(vconf)
13 BuildRequires: pkgconfig(bundle)
14 BuildRequires: pkgconfig(dbus-1)
15 BuildRequires: pkgconfig(dlog)
16 BuildRequires: pkgconfig(ail)
17 BuildRequires: pkgconfig(aul)
18 BuildRequires: cmake
19 Requires(post): /sbin/ldconfig
20 Requires(post): /usr/bin/sqlite3
21 requires(postun): /sbin/ldconfig
22 %description
23 Notificaiton library.
24
25
26 %prep
27 %setup -q
28
29 %package devel
30 Summary:    Notification library (devel)
31 Group:      Development/Libraries
32 Requires:   %{name} = %{version}-%{release}
33 Requires: pkgconfig(sqlite3)
34 Requires: pkgconfig(db-util)
35 Requires: pkgconfig(heynoti)
36 Requires: pkgconfig(vconf)
37 Requires: pkgconfig(bundle)
38 Requires: pkgconfig(dlog)
39 Requires: pkgconfig(ail)
40 Requires: pkgconfig(aul)
41
42 %description devel
43 Notificaiton library (devel).
44
45 %build
46 export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--as-needed"
47 LDFLAGS="$LDFLAGS" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
48 make %{?jobs:-j%jobs}
49
50 %install
51 %make_install
52
53
54 %post
55 /sbin/ldconfig
56
57 mkdir -p /opt/dbspace
58
59 if [ ! -f /opt/dbspace/.notification.db ]
60 then
61         sqlite3 /opt/dbspace/.notification.db 'PRAGMA journal_mode = PERSIST;
62                 create  table if not exists noti_list ( 
63                         type INTEGER NOT NULL,
64                         caller_pkgname TEXT NOT NULL,
65                         launch_pkgname TEXT,
66                         image_path TEXT,
67                         group_id INTEGER default 0,  
68                         internal_group_id INTEGER default 0,  
69                         priv_id INTERGER NOT NULL,  
70                         title_key TEXT,
71                         b_text TEXT,
72                         b_key TEXT,
73                         b_format_args TEXT,
74                         num_format_args INTEGER default 0,
75                         text_domain TEXT,
76                         text_dir TEXT,
77                         time INTEGER default 0,  
78                         insert_time INTEGER default 0,  
79                         args TEXT,  
80                         group_args TEXT,  
81                         b_execute_option TEXT,
82                         b_service_responding TEXT,
83                         b_service_single_launch TEXT,
84                         b_service_multi_launch TEXT,
85                         sound_type INTEGER default 0,
86                         sound_path TEXT,
87                         vibration_type INTEGER default 0,
88                         vibration_path TEXT,
89                         flags_for_property INTEGER default 0,
90                         flag_simmode INTEGER default 0,
91                         display_applist INTEGER,
92                         progress_size DOUBLE default 0,
93                         progress_percentage DOUBLE default 0,
94                         rowid INTEGER PRIMARY KEY AUTOINCREMENT,        
95                         UNIQUE (caller_pkgname, priv_id)  
96                 ); 
97                 create table if not exists noti_group_data (
98                         caller_pkgname TEXT NOT NULL,
99                         group_id INTEGER default 0,
100                         badge INTEGER default 0,
101                         title TEXT,
102                         content TEXT,
103                         loc_title TEXT,
104                         loc_content TEXT,
105                         count_display_title INTEGER,
106                         count_display_content INTEGER,
107                         rowid INTEGER PRIMARY KEY AUTOINCREMENT,
108                         UNIQUE (caller_pkgname, group_id)
109                 );
110                 create  table if not exists ongoing_list ( 
111                         caller_pkgname TEXT NOT NULL,
112                         launch_pkgname TEXT,
113                         icon_path TEXT,
114                         group_id INTEGER default 0,
115                         internal_group_id INTEGER default 0,  
116                         priv_id INTERGER NOT NULL,
117                         title TEXT,
118                         content TEXT,
119                         default_content TEXT,
120                         loc_title TEXT,
121                         loc_content TEXT,
122                         loc_default_content TEXT,
123                         text_domain TEXT,
124                         text_dir TEXT,
125                         args TEXT,  
126                         group_args TEXT,  
127                         flag INTEGER default 0,
128                         progress_size DOUBLE default 0,
129                         progress_percentage DOUBLE default 0,
130                         rowid INTEGER PRIMARY KEY AUTOINCREMENT,        
131                         UNIQUE (caller_pkgname, priv_id)  
132                 ); 
133         '
134
135 fi
136
137 chown root:5000 /opt/dbspace/.notification.db
138 chown root:5000 /opt/dbspace/.notification.db-journal
139 chmod 660 /opt/dbspace/.notification.db
140 chmod 660 /opt/dbspace/.notification.db-journal
141
142 %postun -p /sbin/ldconfig
143
144 %files
145 %{_libdir}/libnotification.so.0*
146
147 %files devel
148 %{_includedir}/notification/notification.h
149 %{_includedir}/notification/notification_error.h
150 %{_includedir}/notification/notification_list.h
151 %{_includedir}/notification/notification_type.h
152 %{_libdir}/libnotification.so
153 %{_libdir}/pkgconfig/notification.pc
154