Tizen 2.1 base
[apps/home/libslp-alarm.git] / packaging / libslp-alarm.spec
1 #sbs-git:slp/apps/l/libslp-alarm libslp-alarm 0.2.7 743c13367284f1394db6db3a2d5a936be5279784
2 # >> macros
3 # << macros
4
5 Name:       libslp-alarm
6 Summary:    libslp-alarm package
7 Version:    0.2.7
8 Release:    59
9 Group:      System/Libraries
10 License:    TBD
11 Source0:    %{name}-%{version}.tar.gz
12 Requires(post):  /sbin/ldconfig
13 Requires(post):  /usr/bin/sqlite3
14 Requires(postun):  /sbin/ldconfig
15 BuildRequires:  cmake 
16 BuildRequires:  pkgconfig(gobject-2.0)
17 BuildRequires:  pkgconfig(glib-2.0)
18 BuildRequires:  pkgconfig(vconf)
19 BuildRequires:  pkgconfig(db-util)
20 BuildRequires:  pkgconfig(dlog)
21 BuildRequires:  pkgconfig(alarm-service)
22
23 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
24
25 %description
26
27
28 %package devel
29 Summary:    libslp-alarm dev package
30 Group:      Development/Libraries
31 Requires:   %{name} = %{version}-%{release}
32
33 %description devel
34
35
36 %prep
37 %setup -q -n %{name}-%{version}
38
39 # >> setup
40 # << setup
41
42 %build
43 # >> build pre
44 # << build pre
45
46 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
47
48 # Call make instruction with smp support
49 make %{?jobs:-j%jobs}
50
51 # >> build post
52 # << build post
53 %install
54 rm -rf %{buildroot}
55 # >> install pre
56 # << install pre
57 %make_install
58
59 # >> install post
60 rm -f %{buildroot}/usr/bin/test_alarmdb
61 # << install post
62
63 %clean
64 rm -rf %{buildroot}
65
66
67
68 %post 
69 /sbin/ldconfig
70 mkdir -p /opt/dbspace/
71 sqlite3 /opt/dbspace/.alarm.db 'PRAGMA journal_mode = PERSIST;
72                                create table if not exists alarm (id INTEGER PRIMARY KEY,
73                                                                           magic INTEGER,
74                                                                           alarm_mgr_id INTEGER,
75                                                                           enable INTEGER,
76                                                                           missed INTEGER,
77                                                                           author INTEGER,
78                                                                           name TEXT,
79                                                                           stime INTEGER,
80                                                                           atime INTEGER,
81                                                                           etime INTEGER,
82                                                                           sdate INTEGER,
83                                                                           edate INTEGER,
84                                                                           timezone TEXT,
85                                                                           repeat_once INTEGER,
86                                                                           repeat_every INTEGER,
87                                                                           repeat_weekly INTEGER,
88                                                                           snooze_enable INTEGER,
89                                                                           snooze_min INTEGER,
90                                                                           snooze_times INTEGER,
91                                                                           count INTEGER,
92                                                                           type INTEGER,
93                                                                           tone TEXT,
94                                                                           volume INTEGER,
95                                                                           auto_power_on INTEGER   );'
96
97 # Change file owner
98 #1.libraries
99 #2.executables
100 #3.configurations
101 #4.images
102 #5.edje
103 #6.internatialize
104 #7.etc
105 #chown :5000 /opt/dbspace
106 chown :6001 /opt/dbspace/.alarm.db
107 chown :6001 /opt/dbspace/.alarm.db-journal
108 #chown root:root /opt/dbspace/.alarm.db
109 #chown root:root /opt/dbspace/.alarm.db-journal
110
111 # Change file permissions
112 #1.libraries
113 #2.executables
114 #3.configurations
115 #4.images
116 #5.edje
117 #6.internatialize
118 #7.etc
119 #chmod 775 /opt/dbspace
120 chmod 660 /opt/dbspace/.alarm.db
121 chmod 660 /opt/dbspace/.alarm.db-journal
122 #chmod 600 /opt/dbspace/.alarm.db
123 #chmod 600 /opt/dbspace/.alarm.db-journal
124
125
126 %postun -p /sbin/ldconfig
127
128
129
130 %files
131 %manifest libslp-alarm.manifest
132 %defattr(-,root,root,-)
133 # >> files
134 %{_libdir}/*.so*
135 # << files
136
137
138 %files devel
139 %defattr(-,root,root,-)
140 # >> files devel
141 %{_includedir}/*
142 %{_libdir}/pkgconfig/*
143 # << files devel
144