Fixed build on x86_64.
[platform/core/telephony/tel-plugin-packetservice.git] / packaging / tel-plugin-packetservice.spec
1 Name:       tel-plugin-packetservice
2 Summary:    Telephony Packet Service library
3 Version:    0.1.34
4 Release:    1
5 Group:      System/Libraries
6 License:    Apache
7 Source0:    tel-plugin-packetservice-%{version}.tar.gz
8 Requires(post): /sbin/ldconfig
9 Requires(postun): /sbin/ldconfig
10 BuildRequires:  cmake
11 BuildRequires:  pkgconfig(glib-2.0)
12 BuildRequires:  pkgconfig(dbus-glib-1)
13 BuildRequires:  pkgconfig(dlog)
14 BuildRequires:  pkgconfig(tcore)
15 BuildRequires:  pkgconfig(iniparser)
16
17 %description
18 Telephony Packet Service library
19
20 %prep
21 %setup -q
22
23 %build
24 %cmake . -DSYSCONFDIR=%{_sysconfdir}
25 make %{?jobs:-j%jobs}
26
27 %post 
28 /sbin/ldconfig
29
30 #create db
31 mkdir -p /opt/dbspace
32
33 if [ ! -f /opt/dbspace/.dnet.db ]
34 then
35   sqlite3 /opt/dbspace/.dnet.db < /usr/share/ps-plugin/dnet_db.sql
36   sqlite3 /opt/dbspace/.dnet.db < /usr/share/ps-plugin/dnet_db_data.sql
37 fi
38
39 rm -f /usr/share/ps-plugin/dnet_db.sql
40 rm -f /usr/share/ps-plugin/dnet_db_data.sql
41
42 #change file permission
43 if [ -f /opt/dbspace/.dnet.db ]
44 then
45   chmod 660 /opt/dbspace/.dnet.db
46 fi
47
48 if [ -f /opt/dbspace/.dnet.db-journal ]
49 then
50   chmod 664 /opt/dbspace/.dnet.db-journal
51 fi
52
53 %postun -p /sbin/ldconfig
54
55 %install
56 %make_install
57 mkdir -p %{buildroot}/usr/share/license
58
59 %files
60 %manifest tel-plugin-packetservice.manifest
61 %defattr(-,root,root,-)
62 /usr/share/ps-plugin/dnet_db.sql
63 /usr/share/ps-plugin/dnet_db_data.sql
64 %{_sysconfdir}/dbus-1/system.d/*
65 %{_libdir}/telephony/plugins/ps-plugin*
66 /usr/share/license/tel-plugin-packetservice