97e2119ce51615463f4d68856eef94b2e8d90de7
[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:    Flora
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 chsmack -a 'libslp-alarm::db' /opt/dbspace/.alarm.db*
98
99 # Change file owner
100 #1.libraries
101 #2.executables
102 #3.configurations
103 #4.images
104 #5.edje
105 #6.internatialize
106 #7.etc
107 #chown :5000 /opt/dbspace
108 chown :6001 /opt/dbspace/.alarm.db
109 chown :6001 /opt/dbspace/.alarm.db-journal
110 #chown root:root /opt/dbspace/.alarm.db
111 #chown root:root /opt/dbspace/.alarm.db-journal
112
113 # Change file permissions
114 #1.libraries
115 #2.executables
116 #3.configurations
117 #4.images
118 #5.edje
119 #6.internatialize
120 #7.etc
121 #chmod 775 /opt/dbspace
122 chmod 660 /opt/dbspace/.alarm.db
123 chmod 660 /opt/dbspace/.alarm.db-journal
124 #chmod 600 /opt/dbspace/.alarm.db
125 #chmod 600 /opt/dbspace/.alarm.db-journal
126
127
128 %postun -p /sbin/ldconfig
129
130
131
132 %files
133 %manifest libslp-alarm.manifest
134 %defattr(-,root,root,-)
135 # >> files
136 %{_libdir}/*.so*
137 # << files
138
139
140 %files devel
141 %defattr(-,root,root,-)
142 # >> files devel
143 %{_includedir}/*
144 %{_libdir}/pkgconfig/*
145 # << files devel
146