Remove gcov rpm package
[platform/core/connectivity/smartcard-service.git] / packaging / smartcard-service.spec
1 Name:       smartcard-service
2 Summary:    Smartcard Service FW
3 Version:    0.1.59
4 Release:    0
5 Group:      Network & Connectivity
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1:    smartcard-service.service
9 BuildRequires: cmake
10 BuildRequires: pkgconfig(glib-2.0)
11 BuildRequires: pkgconfig(gio-unix-2.0)
12 BuildRequires: pkgconfig(dlog)
13 BuildRequires: pkgconfig(aul)
14 BuildRequires: pkgconfig(openssl1.1)
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}/usr/lib/systemd/system/
71 cp -af %{SOURCE1} %{buildroot}/usr/lib/systemd/system/
72
73 mkdir -p %{buildroot}/etc/dbus-1/system.d/
74 cp -af %{_builddir}/%{name}-%{version}/packaging/org.tizen.SmartcardService.conf %{buildroot}/etc/dbus-1/system.d/
75
76 %files
77 %manifest %{name}.manifest
78 %defattr(-,root,root,-)
79 %{_bindir}/smartcard-daemon
80 %{_sysconfdir}/dbus-1/system.d/org.tizen.SmartcardService.conf
81 %{_datadir}/dbus-1/system-services/org.tizen.SmartcardService.service
82 /usr/lib/systemd/system/%{name}.service
83 %if 0%{?gtests:1}
84 %{_bindir}/gtest*
85 %endif
86 %license LICENSE.APLv2
87
88 %files common
89 %manifest %{name}-common.manifest
90 %defattr(-,root,root,-)
91 %{_libdir}/lib%{name}-common.so.*
92 %license LICENSE.APLv2
93
94 %files common-devel
95 %manifest %{name}-common-devel.manifest
96 %defattr(-,root,root,-)
97 %{_includedir}/%{name}-common/*
98 %{_libdir}/lib%{name}-common.so
99 %{_libdir}/pkgconfig/%{name}-common.pc