apply FSL(Flora Software License)
[apps/core/preloaded/libslp-alarm.git] / packaging / libslp-alarm.spec
1 Name:       libslp-alarm
2 Summary:    libslp-alarm package
3 Version:    0.2.7
4 Release:    59
5 Group:      System/Libraries
6 License:    Flora Software License
7 Source0:    %{name}-%{version}.tar.gz
8 Requires(post):  /sbin/ldconfig
9 Requires(post):  /usr/bin/sqlite3
10 Requires(postun):  /sbin/ldconfig
11 BuildRequires:  cmake 
12 BuildRequires:  pkgconfig(gobject-2.0)
13 BuildRequires:  pkgconfig(glib-2.0)
14 BuildRequires:  pkgconfig(vconf)
15 BuildRequires:  pkgconfig(db-util)
16 BuildRequires:  pkgconfig(dlog)
17 BuildRequires:  pkgconfig(vconf)
18 BuildRequires:  pkgconfig(dbus-1)
19 BuildRequires:  pkgconfig(alarm-service)
20 BuildRequires:  vconf-keys-devel
21
22 #Patch0: vconf.patch
23
24
25 %description
26 Alarm Libraries
27
28 %package devel
29 Summary:    libslp-alarm dev package
30 Group:      Development/Libraries
31 Requires:   %{name} = %{version}-%{release}
32
33 %description devel
34 Development files from %{name}.
35
36
37 %prep
38 %setup -q -n %{name}-%{version}
39 #%patch0 -p1
40
41
42 %build
43
44 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
45
46 make %{?jobs:-j%jobs}
47
48 %install
49 %make_install
50
51 rm -f %{buildroot}/usr/bin/test_alarmdb
52
53
54
55 %post 
56 /sbin/ldconfig
57 mkdir -p /opt/dbspace/
58 sqlite3 /opt/dbspace/.alarm.db 'PRAGMA journal_mode = PERSIST;
59                                create table if not exists alarm (id INTEGER PRIMARY KEY autoincrement, 
60                                                                                                         magic INTEGER,
61                                                                                                         alarm_mgr_id INTEGER, 
62                                                                                                         enable INTEGER, 
63                                                                                                         missed INTEGER, 
64                                                                                                         author INTEGER, 
65                                                                                                         name TEXT, 
66                                                                                                         stime INTEGER, 
67                                                                                                         atime INTEGER, 
68                                                                                                         etime INTEGER, 
69                                                                                                         sdate INTEGER, 
70                                                                                                         edate INTEGER, 
71                                                     timezone TEXT,
72                                                                                                         repeat_once INTEGER, 
73                                                                                                         repeat_every INTEGER, 
74                                                                                                         repeat_weekly INTEGER, 
75                                                                                                         snooze_enable INTEGER, 
76                                                                                                         snooze_min INTEGER, 
77                                                                                                         snooze_times INTEGER, 
78                                                                                                         count INTEGER, 
79                                                                                                         type INTEGER, 
80                                                                                                         tone TEXT, 
81                                                                                                         volume INTEGER, 
82                                                                                                         auto_power_on INTEGER   );'
83 chown :6001 /opt/dbspace/.alarm.db
84 chown :6001 /opt/dbspace/.alarm.db-journal
85 chmod 660 /opt/dbspace/.alarm.db
86 chmod 660 /opt/dbspace/.alarm.db-journal
87
88
89 %postun -p /sbin/ldconfig
90
91 %files
92 %{_libdir}/*.so*
93
94
95 %files devel
96 %{_includedir}/*
97 %{_libdir}/pkgconfig/*
98