[Fix Web TCT fail]
[platform/core/connectivity/smartcard-service.git] / packaging / smartcard-service.spec
1 Name:       smartcard-service
2 Summary:    Smartcard Service FW
3 Version:    0.1.58
4 Release:    0
5 Group:      Network & Connectivity
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 BuildRequires: cmake
9 BuildRequires: pkgconfig(glib-2.0)
10 BuildRequires: pkgconfig(gio-unix-2.0)
11 BuildRequires: pkgconfig(dlog)
12 BuildRequires: pkgconfig(aul)
13 BuildRequires: pkgconfig(libssl)
14 BuildRequires: pkgconfig(libcrypto)
15 BuildRequires: pkgconfig(pkgmgr)
16 BuildRequires: pkgconfig(pkgmgr-info)
17 BuildRequires: pkgconfig(cynara-client)
18 BuildRequires: pkgconfig(cynara-creds-gdbus)
19 BuildRequires: pkgconfig(cynara-session)
20 BuildRequires: pkgconfig(capi-system-info)
21
22 BuildRequires: python
23 BuildRequires: python-xml
24
25 Requires(post):   /sbin/ldconfig
26 Requires(postun): /sbin/ldconfig
27 Requires:         %{name}-common = %{version}-%{release}
28
29 %if 0%{?gtests:1}
30 BuildRequires:  pkgconfig(gmock)
31 %endif
32
33 %description
34 Smartcard Service FW.
35
36 %package    common
37 Summary:    common smartcard service
38 Group:      Development/Libraries
39
40
41 %description common
42 common smartcard service.
43
44 %package    common-devel
45 Summary:    common smartcard service
46 Group:      Development/Libraries
47 Requires:   %{name}-common = %{version}-%{release}
48
49
50 %description common-devel
51 common smartcard service.
52
53 %prep
54 %setup -q
55
56
57 %build
58 %if 0%{?gcov:1}
59 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
60 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
61 export LDFLAGS+=" -lgcov "
62 %endif
63
64 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
65                                         -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
66
67 %install
68 %make_install
69
70 mkdir -p %{buildroot}/etc/dbus-1/system.d/
71 cp -af %{_builddir}/%{name}-%{version}/packaging/org.tizen.SmartcardService.conf %{buildroot}/etc/dbus-1/system.d/
72 install -D -m 0644 server/org.tizen.SmartcardService.service %{buildroot}/%{_unitdir}/org.tizen.SmartcardService.service
73
74 %files
75 %manifest %{name}.manifest
76 %defattr(-,root,root,-)
77 %{_bindir}/smartcard-daemon
78 %{_sysconfdir}/dbus-1/system.d/org.tizen.SmartcardService.conf
79 %{_unitdir}/org.tizen.SmartcardService.service
80 %if 0%{?gtests:1}
81 %{_bindir}/gtest*
82 %endif
83 %license LICENSE.APLv2
84
85 %files common
86 %manifest %{name}-common.manifest
87 %defattr(-,root,root,-)
88 %{_libdir}/lib%{name}-common.so.*
89 %license LICENSE.APLv2
90
91 %files common-devel
92 %manifest %{name}-common-devel.manifest
93 %defattr(-,root,root,-)
94 %{_includedir}/%{name}-common/*
95 %{_libdir}/lib%{name}-common.so
96 %{_libdir}/pkgconfig/%{name}-common.pc