2 Summary: Central Key Manager and utilities
6 License: Apache License, Version 2.0
7 Source0: %{name}-%{version}.tar.gz
10 BuildRequires: pkgconfig(dlog)
11 BuildRequires: pkgconfig(openssl)
12 BuildRequires: libattr-devel
13 BuildRequires: pkgconfig(libsmack)
14 BuildRequires: pkgconfig(libsystemd-daemon)
15 BuildRequires: pkgconfig(db-util)
16 BuildRequires: boost-devel
21 Central Key Manager and utilities
23 %package -n libkey-manager-client
24 Summary: Central Key Manager (client)
25 Group: Development/Libraries
26 Requires: key-manager = %{version}-%{release}
27 Requires(post): /sbin/ldconfig
28 Requires(postun): /sbin/ldconfig
30 %description -n libkey-manager-client
31 Central Key Manager package (client)
33 %package -n libkey-manager-client-devel
34 Summary: Central Key Manager (client-devel)
35 Group: Development/Libraries
36 BuildRequires: pkgconfig(capi-base-common)
37 Requires: pkgconfig(capi-base-common)
38 Requires: libkey-manager-client = %{version}-%{release}
40 %description -n libkey-manager-client-devel
41 Central Key Manager package (client-devel)
43 %package -n key-manager-tests
44 Summary: internal test for key-manager
46 Requires: key-manager = %{version}-%{release}
48 %description -n key-manager-tests
49 Internal test for key-manager
56 %if 0%{?sec_build_binary_debug_enable}
57 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
58 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
59 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
63 export LDFLAGS+="-Wl,--rpath=%{_libdir} "
65 %cmake . -DVERSION=%{version} \
66 -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:RELEASE} \
67 -DCMAKE_VERBOSE_MAKEFILE=ON
72 mkdir -p %{buildroot}/usr/share/license
73 cp LICENSE %{buildroot}/usr/share/license/%{name}
74 cp LICENSE %{buildroot}/usr/share/license/libkey-manager-client
75 cp LICENSE %{buildroot}/usr/share/license/libkey-manager-control-client
76 mkdir -p %{buildroot}/etc/security/
79 mkdir -p %{buildroot}/usr/lib/systemd/system/multi-user.target.wants
80 mkdir -p %{buildroot}/usr/lib/systemd/system/sockets.target.wants
81 ln -s ../central-key-manager.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/central-key-manager.service
82 ln -s ../central-key-manager-echo.socket %{buildroot}/usr/lib/systemd/system/sockets.target.wants/central-key-manager-echo.socket
83 ln -s ../central-key-manager-api-control.socket %{buildroot}/usr/lib/systemd/system/sockets.target.wants/central-key-manager-api-control.socket
84 ln -s ../central-key-manager-api-storage.socket %{buildroot}/usr/lib/systemd/system/sockets.target.wants/central-key-manager-api-storage.socket
85 ln -s ../central-key-manager-api-ocsp.socket %{buildroot}/usr/lib/systemd/system/sockets.target.wants/central-key-manager-api-ocsp.socket
91 %if "%{sec_product_feature_security_mdfpp_enable}" == "1"
92 rm %{_libdir}/libkey-manager-key-provider.so.1.0.0
93 ln -s %{_libdir}/libskmm.so %{_libdir}/libkey-manager-key-provider.so.1.0.0
95 systemctl daemon-reload
98 systemctl start central-key-manager.service
103 systemctl restart central-key-manager.service
110 systemctl stop central-key-manager.service
116 systemctl daemon-reload
119 %post -n libkey-manager-client -p /sbin/ldconfig
121 %postun -n libkey-manager-client -p /sbin/ldconfig
123 %files -n key-manager
124 %manifest %{_datadir}/key-manager.manifest
125 %attr(755,root,root) /usr/bin/key-manager
126 %{_libdir}/libkey-manager-commons.so*
127 %{_libdir}/libkey-manager-key-provider.so*
128 %attr(-,root,root) /usr/lib/systemd/system/multi-user.target.wants/central-key-manager.service
129 %attr(-,root,root) /usr/lib/systemd/system/central-key-manager.service
130 %attr(-,root,root) /usr/lib/systemd/system/central-key-manager.target
131 %attr(-,root,root) /usr/lib/systemd/system/sockets.target.wants/central-key-manager-echo.socket
132 %attr(-,root,root) /usr/lib/systemd/system/central-key-manager-echo.socket
133 %attr(-,root,root) /usr/lib/systemd/system/sockets.target.wants/central-key-manager-api-control.socket
134 %attr(-,root,root) /usr/lib/systemd/system/central-key-manager-api-control.socket
135 %attr(-,root,root) /usr/lib/systemd/system/sockets.target.wants/central-key-manager-api-storage.socket
136 %attr(-,root,root) /usr/lib/systemd/system/central-key-manager-api-storage.socket
137 %attr(-,root,root) /usr/lib/systemd/system/sockets.target.wants/central-key-manager-api-ocsp.socket
138 %attr(-,root,root) /usr/lib/systemd/system/central-key-manager-api-ocsp.socket
139 %{_datadir}/license/%{name}
141 %files -n libkey-manager-client
142 %manifest %{_datadir}/libkey-manager-client.manifest
143 %manifest %{_datadir}/libkey-manager-control-client.manifest
144 %defattr(-,root,root,-)
145 %{_libdir}/libkey-manager-client.so.*
146 %{_libdir}/libkey-manager-control-client.so.*
147 %{_datadir}/license/libkey-manager-client
148 %{_datadir}/license/libkey-manager-control-client
151 %files -n libkey-manager-client-devel
152 %defattr(-,root,root,-)
153 %{_libdir}/libkey-manager-client.so
154 %{_libdir}/libkey-manager-control-client.so
155 %{_includedir}/ckm/ckm/ckm-manager.h
156 %{_includedir}/ckm/ckm/ckm-certificate.h
157 %{_includedir}/ckm/ckm/ckm-control.h
158 %{_includedir}/ckm/ckm/ckm-error.h
159 %{_includedir}/ckm/ckm/ckm-echo.h
160 %{_includedir}/ckm/ckm/ckm-key.h
161 %{_includedir}/ckm/ckm/ckm-password.h
162 %{_includedir}/ckm/ckm/ckm-raw-buffer.h
163 %{_includedir}/ckm/ckm/ckm-type.h
164 %{_includedir}/ckm/ckmc/ckmc-manager.h
165 %{_includedir}/ckm/ckmc/ckmc-control.h
166 %{_includedir}/ckm/ckmc/ckmc-error.h
167 %{_includedir}/ckm/ckmc/ckmc-type.h
168 %{_libdir}/pkgconfig/*.pc
170 %files -n key-manager-tests
171 %defattr(-,root,root,-)
172 %{_bindir}/ckm-tests-internal