1 %{!?build_type:%define build_type "RELEASE"}
6 Source0: %{name}-%{version}.tar.gz
9 Summary: Yet Another Crypto API
11 BuildRequires: python3 >= 3.4
12 BuildRequires: pkgconfig(capi-base-common)
13 BuildRequires: pkgconfig(openssl1.1)
14 BuildRequires: boost-devel
15 %if %{build_type} == "COVERAGE"
18 Requires(post): /sbin/ldconfig
19 Requires(postun): /sbin/ldconfig
22 The package provides Yet Another Crypto API.
24 %post -p /sbin/ldconfig
26 %postun -p /sbin/ldconfig
30 %manifest yaca.manifest
31 %{_libdir}/libyaca.so.0
32 %{_libdir}/libyaca.so.%{version}
38 %cmake . -DCMAKE_BUILD_TYPE=%{build_type}
40 make -k %{?jobs:-j%jobs}
42 %if %{build_type} == "COVERAGE"
44 find . \( -name '*.gcno' ! -name 'tc_*' \) -exec cp '{}' gcov-obj ';'
49 %py3_compile %{buildroot}/%{python3_sitearch}
51 %if %{build_type} == "COVERAGE"
52 mkdir -p %{buildroot}%{_datadir}/gcov/obj
53 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
60 ## Devel Package ###############################################################
62 Summary: Yet Another Crypto API development files
64 Requires: yaca = %{version}-%{release}
67 The package provides Yet Another Crypto API development files.
72 %{_libdir}/pkgconfig/yaca.pc
74 ## Examples Package ############################################################
76 Summary: Yet Another Crypto API example files
78 Requires: yaca = %{version}-%{release}
81 The package provides Yet Another Crypto API example files.
84 %{_bindir}/yaca-example*
85 %{_datadir}/%{name}/examples
87 ## Tests Package ############################################################
89 Summary: Yet Another Crypto API tests
91 Requires: yaca = %{version}-%{release}
94 The package provides Yet Another Crypto API unit tests.
97 %{_bindir}/yaca-unit-tests*
99 ## Python3 Package ############################################################
100 %package -n python3-yaca
101 Summary: Yet Another Crypto API Python3 bindings
102 Group: Security/Other
103 Requires: yaca = %{version}-%{release}
105 %description -n python3-yaca
106 The package provides Yet Another Crypto API bindings for Python3.
108 %files -n python3-yaca
109 %{python3_sitearch}/%{name}
111 ## gcov Package ############################################################
112 %if %{build_type} == "COVERAGE"
114 Summary: yaca gcov for measuring test coverage
115 Group: Secureity/Testing
117 New yaca gcov objects
120 %{_datadir}/gcov/obj/*