1c6638abb51e60a28e3e8c15daecbd4c6d824023
[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 %if 0%{?gcov:1}
54 %package gcov
55 Summary:    A Smartcard gcov Tool
56 Group:      Network & Connectivity/Development
57
58 %description gcov
59 Smartcard gcov objects
60 %endif
61
62 %prep
63 %setup -q
64
65
66 %build
67 %if 0%{?gcov:1}
68 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
69 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
70 export LDFLAGS+=" -lgcov "
71 %endif
72
73 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
74                                         -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
75
76 %install
77 %make_install
78
79 %if 0%{?gcov:1}
80 mkdir -p gcov-obj
81 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
82 %endif
83
84 %if 0%{?gcov:1}
85 mkdir -p %{buildroot}%{_datadir}/gcov/obj
86 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
87 %endif
88
89 mkdir -p %{buildroot}/usr/lib/systemd/system/
90 cp -af %{SOURCE1} %{buildroot}/usr/lib/systemd/system/
91
92 mkdir -p %{buildroot}/etc/dbus-1/system.d/
93 cp -af %{_builddir}/%{name}-%{version}/packaging/org.tizen.SmartcardService.conf %{buildroot}/etc/dbus-1/system.d/
94
95 %files
96 %manifest %{name}.manifest
97 %defattr(-,root,root,-)
98 %{_bindir}/smartcard-daemon
99 %{_sysconfdir}/dbus-1/system.d/org.tizen.SmartcardService.conf
100 %{_datadir}/dbus-1/system-services/org.tizen.SmartcardService.service
101 /usr/lib/systemd/system/%{name}.service
102 %if 0%{?gtests:1}
103 %{_bindir}/gtest*
104 %endif
105 %license LICENSE.APLv2
106
107 %files common
108 %manifest %{name}-common.manifest
109 %defattr(-,root,root,-)
110 %{_libdir}/lib%{name}-common.so.*
111 %license LICENSE.APLv2
112
113 %files common-devel
114 %manifest %{name}-common-devel.manifest
115 %defattr(-,root,root,-)
116 %{_includedir}/%{name}-common/*
117 %{_libdir}/lib%{name}-common.so
118 %{_libdir}/pkgconfig/%{name}-common.pc
119
120 %if 0%{?gcov:1}
121 %files gcov
122 %{_datadir}/gcov/obj/*
123 %endif