595c658a5c210ca6687cd2fe848d8ecc2fee42a0
[apps/core/preloaded/libslp-memo.git] / packaging / libslp-memo.spec
1 Name:       libslp-memo
2 Summary:    Memo DB interface library
3 Version:    0.1.5
4 Release:    1
5 Group:      Applications/Libraries
6 License:    Flora
7 Source0:    libslp-memo-%{version}.tar.gz
8 BuildRequires:  pkgconfig(dlog)
9 BuildRequires:  pkgconfig(heynoti)
10 BuildRequires:  pkgconfig(db-util)
11 BuildRequires:  pkgconfig(vconf)
12
13 BuildRequires:  cmake
14 Requires(post): /usr/bin/sqlite3
15
16 %description
17 library for memo(development package)
18
19 %package devel
20 Summary:    Development files for %{name}
21 Group:      Development/Libraries
22 Requires:   %{name} = %{version}-%{release}
23
24 %description devel
25 Development files for %{name}
26
27 %prep
28 %setup -q
29
30 %build
31 export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--hash-style=both"
32 %cmake .
33
34 make %{?jobs:-j%jobs}
35
36 %install
37 %make_install
38
39 %post
40 mkdir -p /opt/dbspace
41 sqlite3 /opt/dbspace/.memo.db 'PRAGMA journal_mode = PERSIST;
42 CREATE TABLE if not exists memo ( id INTEGER PRIMARY KEY autoincrement, content TEXT, written_time TEXT, create_time INTEGER, modi_time INTEGER, delete_time INTEGER, doodle INTEGER, color INTEGER, comment TEXT, favorite INTEGER,font_respect INTEGER, font_size INTEGER, font_color INTEGER, doodle_path TEXT );
43                               '
44
45 if [ -f /usr/lib/rpm-plugins/msm.so ]
46 then
47 chsmack -a 'memo::db' /opt/usr/dbspace/.memo.db*
48 fi
49
50
51
52 # Change file owner
53 chown :5000 /opt/dbspace/.memo.db
54 chown :5000 /opt/dbspace/.memo.db-journal
55
56 # Change file permissions
57 chmod 660  /opt/dbspace/.memo.db
58 chmod 660  /opt/dbspace/.memo.db-journal
59
60 %files
61 %defattr(-,root,root,-)
62 %manifest libslp-memo.manifest
63 %{_libdir}/*.so.*
64
65 %files devel
66 %defattr(-,root,root,-)
67 %{_libdir}/*.so
68 %{_libdir}/pkgconfig/memo.pc
69 %{_includedir}/*.h