Fix TIVI-2012 : Unsplit ail package
[platform/core/appfw/ail.git] / packaging / ail.spec
1 Name:           ail
2 Version:        0.2.73
3 Release:        1
4 License:        Apache-2.0
5 Summary:        Application Information Library
6 Group:          Application Framework/Libraries
7 Source0:        %{name}-%{version}.tar.gz
8 Source1001:     ail.manifest
9 BuildRequires:  cmake
10 BuildRequires:  vconf-keys-devel
11 BuildRequires:  pkgconfig(db-util)
12 BuildRequires:  pkgconfig(dlog)
13 BuildRequires:  pkgconfig(sqlite3)
14 BuildRequires:  pkgconfig(vconf)
15 BuildRequires:  pkgconfig(xdgmime)
16 Provides:       libail = %{version}-%{release}
17
18 %description
19 Application Information Library
20
21 %package devel
22 Summary:        Application Information Library Development files
23 Requires:       libail = %{version}-%{release}
24
25 %description devel
26 Application Information Library (devel)
27
28 %prep
29 %setup -q
30 cp %{SOURCE1001} .
31
32 %build
33 CFLAGS+=" -fpic"
34 %cmake .  -DBUILD_PKGTYPE=rpm
35
36 make %{?_smp_mflags}
37
38 %install
39 %make_install
40
41 mkdir -p %{buildroot}/opt/dbspace/
42 mkdir -p %{buildroot}/opt/share/applications/
43
44 %post
45 /sbin/ldconfig
46 vconftool set -t string db/ail/ail_info "0" -f -s system::vconf_inhouse
47 vconftool set -t string db/menuscreen/desktop "0" -f -s system::vconf_inhouse
48 vconftool set -t string db/menu_widget/language "en_US.utf8" -f -s system::vconf_inhouse
49
50 CHDBGID="6010"
51
52 update_DAC_for_db_file()
53 {
54         if [ ! -f $@ ]; then
55                 touch $@
56         fi
57
58         chown :$CHDBGID $@ 2>/dev/null
59         if [ $? -ne 0 ]; then
60                 echo "Failed to change the owner of $@"
61         fi
62         chmod 664 $@ 2>/dev/null
63         if [ $? -ne 0 ]; then
64                 echo "Failed to change the perms of $@"
65         fi
66 }
67 ail_initdb
68 update_DAC_for_db_file /opt/dbspace/.app_info.db
69 update_DAC_for_db_file /opt/dbspace/.app_info.db-journal
70
71 %postun
72 /sbin/ldconfig
73 if [ $1 == 0 ]; then
74 rm -f /opt/dbspace/.app_info.db*
75 fi
76
77
78 %files
79 %manifest %{name}.manifest
80 %license LICENSE
81 %dir /opt/share/applications
82 %{_bindir}/ail_initdb
83 %{_datadir}/install-info/*
84 %{_libdir}/libail.so.0
85 %{_libdir}/libail.so.0.1.0
86
87
88 %files devel
89 %manifest %{name}.manifest
90 %{_includedir}/ail.h
91 %{_libdir}/libail.so
92 %{_libdir}/pkgconfig/ail.pc