%{!?build_type:%define build_type "RELEASE"} Name: yaca Version: 0.0.6 Release: 0 Source0: %{name}-%{version}.tar.gz License: Apache-2.0 Group: Security/Other Summary: Yet Another Crypto API BuildRequires: cmake BuildRequires: python3 >= 3.4 BuildRequires: pkgconfig(capi-base-common) BuildRequires: pkgconfig(openssl1.1) BuildRequires: boost-devel %if %{build_type} == "COVERAGE" BuildRequires: lcov %endif Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig %description The package provides Yet Another Crypto API. %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license LICENSE %manifest yaca.manifest %{_libdir}/libyaca.so.0 %{_libdir}/libyaca.so.%{version} %prep %setup -q %build %cmake . -DCMAKE_BUILD_TYPE=%{build_type} make -k %{?jobs:-j%jobs} %if %{build_type} == "COVERAGE" mkdir -p gcov-obj find . \( -name '*.gcno' ! -name 'tc_*' \) -exec cp '{}' gcov-obj ';' %endif %install %make_install %py3_compile %{buildroot}/%{python3_sitearch} %if %{build_type} == "COVERAGE" mkdir -p %{buildroot}%{_datadir}/gcov/obj install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj %endif %clean rm -rf %{buildroot} ## Devel Package ############################################################### %package devel Summary: Yet Another Crypto API development files Group: Security/Other Requires: yaca = %{version}-%{release} %description devel The package provides Yet Another Crypto API development files. %files devel %{_libdir}/libyaca.so %{_includedir}/yaca %{_libdir}/pkgconfig/yaca.pc ## Examples Package ############################################################ %package examples Summary: Yet Another Crypto API example files Group: Security/Other Requires: yaca = %{version}-%{release} %description examples The package provides Yet Another Crypto API example files. %files examples %{_bindir}/yaca-example* %{_datadir}/%{name}/examples ## Tests Package ############################################################ %package tests Summary: Yet Another Crypto API tests Group: Security/Other Requires: yaca = %{version}-%{release} %description tests The package provides Yet Another Crypto API unit tests. %files tests %{_bindir}/yaca-unit-tests* ## Python3 Package ############################################################ %package -n python3-yaca Summary: Yet Another Crypto API Python3 bindings Group: Security/Other Requires: yaca = %{version}-%{release} %description -n python3-yaca The package provides Yet Another Crypto API bindings for Python3. %files -n python3-yaca %{python3_sitearch}/%{name} ## gcov Package ############################################################ %if %{build_type} == "COVERAGE" %package gcov Summary: yaca gcov for measuring test coverage Group: Secureity/Testing %description gcov New yaca gcov objects %files gcov %{_datadir}/gcov/obj/* %endif