Fix initial value for Vconf widget languague Key
[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 Source1001:     ail.manifest
10 Requires(post): /sbin/ldconfig
11 Requires(postun): /sbin/ldconfig
12 BuildRequires:  cmake
13 BuildRequires:  vconf-keys-devel
14 BuildRequires:  pkgconfig(sqlite3)
15 BuildRequires:  pkgconfig(dlog)
16 BuildRequires:  pkgconfig(vconf)
17 BuildRequires:  pkgconfig(db-util)
18 BuildRequires:  pkgconfig(xdgmime)
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 cp %{SOURCE1001} .
34
35 %build
36 CFLAGS+=" -fpic"
37 %cmake .  -DBUILD_PKGTYPE=rpm
38
39 make %{?jobs:-j%jobs}
40
41 %install
42 %make_install
43
44 mkdir -p %{buildroot}/opt/dbspace/
45 mkdir -p %{buildroot}/opt/share/applications/
46
47 %post
48 vconftool set -t string db/ail/ail_info "0" -f
49 vconftool set -t string db/menuscreen/desktop "0" -f
50 vconftool set -t string db/menu_widget/language "en_US.utf8" -f
51
52 CHDBGID="6010"
53
54 update_DAC_for_db_file()
55 {
56         if [ ! -f $@ ]; then
57                 touch $@
58         fi
59
60         chown :$CHDBGID $@ 2>/dev/null
61         if [ $? -ne 0 ]; then
62                 echo "Failed to change the owner of $@"
63         fi
64         chmod 664 $@ 2>/dev/null
65         if [ $? -ne 0 ]; then
66                 echo "Failed to change the perms of $@"
67         fi
68 }
69 ail_initdb
70 update_DAC_for_db_file /opt/dbspace/.app_info.db
71 update_DAC_for_db_file /opt/dbspace/.app_info.db-journal
72
73 %postun
74 if [ $1 == 0 ]; then
75 rm -f /opt/dbspace/.app_info.db*
76 fi
77
78 %files
79 %manifest %{name}.manifest
80 %{_libdir}/libail.so.0
81 %{_libdir}/libail.so.0.1.0
82 /opt/dbspace
83 /opt/share/applications
84 /usr/bin/ail_initdb
85 /usr/share/install-info/*
86
87 %files devel
88 %manifest %{name}.manifest
89 /usr/include/ail.h
90 %{_libdir}/libail.so
91 %{_libdir}/pkgconfig/ail.pc