add appinfo db close api
[platform/core/appfw/ail.git] / packaging / ail.spec
1 #sbs-git:slp/pkgs/a/ail ail 0.2.22 29ac1f2c98453cad647cca6a92abc7da3dbb047b
2 Name:       ail
3 Summary:    Application Information Library
4 Version:    0.2.67
5 Release:    1
6 Group:      System/Libraries
7 License:    Apache License, Version 2.0
8 Source0:    %{name}-%{version}.tar.gz
9 Requires(post): /sbin/ldconfig
10 Requires(postun): /sbin/ldconfig
11 BuildRequires:  cmake
12 BuildRequires:  vconf-keys-devel
13 BuildRequires:  pkgconfig(sqlite3)
14 BuildRequires:  pkgconfig(dlog)
15 BuildRequires:  pkgconfig(vconf)
16 BuildRequires:  pkgconfig(db-util)
17 BuildRequires:  pkgconfig(xdgmime)
18
19
20 %description
21 Application Information Library
22
23 %package devel
24 Summary:    Application Information Library Development files
25 Group:      Development/Libraries
26 Requires:   %{name} = %{version}-%{release}
27
28 %description devel
29 Application Information Library (devel)
30
31 %prep
32 %setup -q
33
34 %build
35 CFLAGS+=" -fpic"
36 %cmake .  -DBUILD_PKGTYPE=rpm
37
38 make %{?jobs:-j%jobs}
39
40 %install
41 %make_install
42
43 %post
44 vconftool set -t string db/ail/ail_info "0" -f
45 vconftool set -t string db/menuscreen/desktop "0" -f
46
47 CHDBGID="6010"
48
49 update_DAC_for_db_file()
50 {
51         if [ ! -f $@ ]; then
52                 touch $@
53         fi
54
55         chown :$CHDBGID $@ 2>/dev/null
56         if [ $? -ne 0 ]; then
57                 echo "Failed to change the owner of $@"
58         fi
59         chmod 664 $@ 2>/dev/null
60         if [ $? -ne 0 ]; then
61                 echo "Failed to change the perms of $@"
62         fi
63 }
64 mkdir -p /opt/dbspace/
65 ail_initdb
66 update_DAC_for_db_file /opt/dbspace/.app_info.db
67 update_DAC_for_db_file /opt/dbspace/.app_info.db-journal
68 chsmack -a 'ail::db' /opt/dbspace/.app_info.db*
69
70 %postun
71
72 %files
73 %manifest ail.manifest
74 %{_libdir}/libail.so.0
75 %{_libdir}/libail.so.0.1.0
76 /usr/bin/ail_initdb
77 /usr/share/install-info/*
78
79 %files devel
80 /usr/include/ail.h
81 %{_libdir}/libail.so
82 %{_libdir}/pkgconfig/ail.pc