ab1a2e2acd6d4a40053eaec253bf35c90192c604
[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(openssl1.1)
14 BuildRequires: pkgconfig(pkgmgr)
15 BuildRequires: pkgconfig(pkgmgr-info)
16 BuildRequires: pkgconfig(cynara-client)
17 BuildRequires: pkgconfig(cynara-creds-gdbus)
18 BuildRequires: pkgconfig(cynara-session)
19 BuildRequires: pkgconfig(capi-system-info)
20
21 BuildRequires: python
22 BuildRequires: python-xml
23
24 Requires(post):   /sbin/ldconfig
25 Requires(postun): /sbin/ldconfig
26 Requires:         %{name}-common = %{version}-%{release}
27
28 %if 0%{?gtests:1}
29 BuildRequires:  pkgconfig(gmock)
30 %endif
31
32 %description
33 Smartcard Service FW.
34
35 %package    common
36 Summary:    common smartcard service
37 Group:      Development/Libraries
38
39
40 %description common
41 common smartcard service.
42
43 %package    common-devel
44 Summary:    common smartcard service
45 Group:      Development/Libraries
46 Requires:   %{name}-common = %{version}-%{release}
47
48
49 %description common-devel
50 common smartcard service.
51
52 %prep
53 %setup -q
54
55
56 %build
57 %if 0%{?gcov:1}
58 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
59 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
60 export LDFLAGS+=" -lgcov "
61 %endif
62
63 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
64                                         -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
65
66 %install
67 %make_install
68
69 mkdir -p %{buildroot}/etc/dbus-1/system.d/
70 cp -af %{_builddir}/%{name}-%{version}/packaging/org.tizen.SmartcardService.conf %{buildroot}/etc/dbus-1/system.d/
71
72 %files
73 %manifest %{name}.manifest
74 %defattr(-,root,root,-)
75 %{_bindir}/smartcard-daemon
76 %{_sysconfdir}/dbus-1/system.d/org.tizen.SmartcardService.conf
77 %{_datadir}/dbus-1/system-services/org.tizen.SmartcardService.service
78 %if 0%{?gtests:1}
79 %{_bindir}/gtest*
80 %endif
81 %license LICENSE.APLv2
82
83 %files common
84 %manifest %{name}-common.manifest
85 %defattr(-,root,root,-)
86 %{_libdir}/lib%{name}-common.so.*
87 %license LICENSE.APLv2
88
89 %files common-devel
90 %manifest %{name}-common-devel.manifest
91 %defattr(-,root,root,-)
92 %{_includedir}/%{name}-common/*
93 %{_libdir}/lib%{name}-common.so
94 %{_libdir}/pkgconfig/%{name}-common.pc