ec80e5c73a4946138bcf6cff3a156e63f22421a6
[framework/telephony/tel-plugin-imc.git] / packaging / tel-plugin-imc.spec
1 %define major 0
2 %define minor 1
3 %define patchlevel 72
4
5
6 Name:             tel-plugin-imc
7 Version:          %{major}.%{minor}.%{patchlevel}
8 Release:          1
9 License:          Apache-2.0
10 Summary:          imc-plugin for Telephony
11 Group:            Development/Libraries
12 Source0:          tel-plugin-imc-%{version}.tar.gz
13
14 %if "%{?tizen_profile_name}" == "mobile" && "%{_repository}" == "target"
15 %else
16 ExcludeArch: %{arm} %ix86 x86_64
17 %endif
18
19 BuildRequires:    cmake
20 BuildRequires:    pkgconfig(glib-2.0)
21 BuildRequires:    pkgconfig(dlog)
22 BuildRequires:    pkgconfig(tcore)
23 BuildRequires:    pkgconfig(db-util)
24 BuildRequires:    pkgconfig(vconf)
25 BuildRequires:    pkgconfig(libxml-2.0)
26 Requires(post):   /sbin/ldconfig
27 Requires(postun): /sbin/ldconfig
28
29 %description
30 IMC plugin for telephony
31
32 %prep
33 %setup -q
34
35 %build
36 %cmake .
37 make %{?_smp_mflags}
38
39 %post
40 /sbin/ldconfig
41 mkdir -p /opt/dbspace
42
43 if [ ! -f /opt/dbspace/.mcc_mnc_oper_list.db ]
44 then
45         sqlite3 /opt/dbspace/.mcc_mnc_oper_list.db < /tmp/mcc_mnc_oper_list.sql
46 fi
47
48 rm -f /tmp/mcc_mnc_oper_list.sql
49
50 if [ -f /opt/dbspace/.mcc_mnc_oper_list.db ]
51 then
52         chmod 600 /opt/dbspace/.mcc_mnc_oper_list.db
53 fi
54 if [ -f /opt/dbspace/.mcc_mnc_oper_list.db-journal ]
55 then
56         chmod 644 /opt/dbspace/.mcc_mnc_oper_list.db-journal
57 fi
58
59 %postun -p /sbin/ldconfig
60
61 %install
62 %make_install
63 mkdir -p %{buildroot}/usr/share/license
64 cp LICENSE %{buildroot}/usr/share/license/%{name}
65
66 %files
67
68 %defattr(-,root,root,-)
69
70 %{_libdir}/telephony/plugins/modems/*
71 /tmp/mcc_mnc_oper_list.sql
72 /usr/share/license/%{name}