b28d29e97e45acbfde363feec162eb8145772685
[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.68
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 %description
20 Application Information Library
21
22 %package devel
23 Summary:    Application Information Library Development files
24 Group:      Development/Libraries
25 Requires:   %{name} = %{version}-%{release}
26
27 %description devel
28 Application Information Library (devel)
29
30 %prep
31 %setup -q
32
33 %build
34 CFLAGS+=" -fpic"
35 %cmake .  -DBUILD_PKGTYPE=rpm
36
37 make %{?jobs:-j%jobs}
38
39 %install
40 %make_install
41
42 %post
43 vconftool set -t string db/ail/ail_info "0" -f
44 vconftool set -t string db/menuscreen/desktop "0" -f
45
46 CHDBGID="6010"
47
48 update_DAC_for_db_file()
49 {
50         if [ ! -f $@ ]; then
51                 touch $@
52         fi
53
54         chown :$CHDBGID $@ 2>/dev/null
55         if [ $? -ne 0 ]; then
56                 echo "Failed to change the owner of $@"
57         fi
58         chmod 664 $@ 2>/dev/null
59         if [ $? -ne 0 ]; then
60                 echo "Failed to change the perms of $@"
61         fi
62 }
63 mkdir -p /opt/dbspace/
64 ail_initdb
65 update_DAC_for_db_file /opt/dbspace/.app_info.db
66 update_DAC_for_db_file /opt/dbspace/.app_info.db-journal
67 chsmack -a 'ail::db' /opt/dbspace/.app_info.db*
68
69 %postun
70
71 %files
72 %manifest ail.manifest
73 %{_libdir}/libail.so.0
74 %{_libdir}/libail.so.0.1.0
75 /usr/bin/ail_initdb
76 /usr/share/install-info/*
77
78 %files devel
79 /usr/include/ail.h
80 %{_libdir}/libail.so
81 %{_libdir}/pkgconfig/ail.pc