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