Update spec file for license
[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 mkdir -p %{buildroot}/usr/share/license
56 cp LICENSE %{buildroot}/usr/share/license/%{name}
57 # >> install pre
58 # << install pre
59 %make_install
60
61 # >> install post
62 rm -f %{buildroot}/usr/bin/test_alarmdb
63 # << install post
64
65 %clean
66 rm -rf %{buildroot}
67
68
69
70 %post 
71 /sbin/ldconfig
72 mkdir -p /opt/dbspace/
73 sqlite3 /opt/dbspace/.alarm.db 'PRAGMA journal_mode = PERSIST;
74                                create table if not exists alarm (id INTEGER PRIMARY KEY,
75                                                                           magic INTEGER,
76                                                                           alarm_mgr_id INTEGER,
77                                                                           enable INTEGER,
78                                                                           missed INTEGER,
79                                                                           author INTEGER,
80                                                                           name TEXT,
81                                                                           stime INTEGER,
82                                                                           atime INTEGER,
83                                                                           etime INTEGER,
84                                                                           sdate INTEGER,
85                                                                           edate INTEGER,
86                                                                           timezone TEXT,
87                                                                           repeat_once INTEGER,
88                                                                           repeat_every INTEGER,
89                                                                           repeat_weekly INTEGER,
90                                                                           snooze_enable INTEGER,
91                                                                           snooze_min INTEGER,
92                                                                           snooze_times INTEGER,
93                                                                           count INTEGER,
94                                                                           type INTEGER,
95                                                                           tone TEXT,
96                                                                           volume INTEGER,
97                                                                           auto_power_on INTEGER   );'
98
99 chsmack -a 'libslp-alarm::db' /opt/dbspace/.alarm.db*
100
101 # Change file owner
102 #1.libraries
103 #2.executables
104 #3.configurations
105 #4.images
106 #5.edje
107 #6.internatialize
108 #7.etc
109 #chown :5000 /opt/dbspace
110 chown :6001 /opt/dbspace/.alarm.db
111 chown :6001 /opt/dbspace/.alarm.db-journal
112 #chown root:root /opt/dbspace/.alarm.db
113 #chown root:root /opt/dbspace/.alarm.db-journal
114
115 # Change file permissions
116 #1.libraries
117 #2.executables
118 #3.configurations
119 #4.images
120 #5.edje
121 #6.internatialize
122 #7.etc
123 #chmod 775 /opt/dbspace
124 chmod 660 /opt/dbspace/.alarm.db
125 chmod 660 /opt/dbspace/.alarm.db-journal
126 #chmod 600 /opt/dbspace/.alarm.db
127 #chmod 600 /opt/dbspace/.alarm.db-journal
128
129
130 %postun -p /sbin/ldconfig
131
132
133
134 %files
135 %manifest libslp-alarm.manifest
136 %defattr(-,root,root,-)
137 # >> files
138 %{_libdir}/*.so*
139 /usr/share/license/%{name}
140 # << files
141
142
143 %files devel
144 %defattr(-,root,root,-)
145 # >> files devel
146 %{_includedir}/*
147 %{_libdir}/pkgconfig/*
148 # << files devel
149