%global major_version 3 Name: botan3 Version: 3.9.0 Release: %autorelease Summary: Crypto and TLS for C++ License: BSD-2-Clause URL: https://botan.randombit.net/ Source0: https://botan.randombit.net/releases/Botan-%{version}.tar.xz Source1: https://botan.randombit.net/releases/Botan-%{version}.tar.xz.asc Source2: https://botan.randombit.net/pgpkey.txt Patch0: install-fix.patch BuildRequires: gcc-c++ BuildRequires: python3 BuildRequires: python3-devel BuildRequires: python3-docutils BuildRequires: python3-sphinx BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(tss2-esys) BuildRequires: pkgconfig(tss2-rc) BuildRequires: pkgconfig(tss2-tctildr) BuildRequires: pkgconfig(tss2-mu) BuildRequires: doxygen BuildRequires: make %description Botan is a BSD-licensed crypto library written in C++. It provides a wide variety of basic cryptographic algorithms, X.509 certificates and CRLs, PKCS \#11 certificate requests, a filter/pipe message processing system, and a wide variety of other features, all written in portable C++. The API reference, tutorial, and examples may help impart the flavor of the library. This is the current stable release branch 3.x of Botan. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package -n python3-%{name} Summary: Python3 bindings for %{name} BuildArch: noarch Requires: %{name} = %{version}-%{release} %{?python_provide:%python_provide python3-%{name}} %description -n python3-%{name} %{summary} This package contains the Python3 binding for %{name}. %package doc Summary: Documentation for %{name} BuildArch: noarch %description doc %{summary} This package contains HTML documentation for %{name}. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data=%{SOURCE0} %autosetup -n Botan-%{version} -p1 %build export CXXFLAGS="${CXXFLAGS:-%{optflags}}" # we have the necessary prerequisites, so enable optional modules %global enable_modules bzip2,zlib %{__python3} ./configure.py \ --prefix=%{_prefix} \ --libdir=%{_lib} \ --docdir=%{_docdir} \ --cc=gcc \ --os=linux \ --cpu=%{_arch} \ --enable-modules=%{enable_modules} \ --with-python-version=%{python3_version} \ --with-sphinx \ --with-doxygen \ --with-rst2man \ --without-cmake-config \ --distribution-info="$(source /etc/os-release ; echo "$NAME")" \ --disable-static-library \ --enable-stack-scrubbing \ --with-tpm2 \ --with-debug-info %make_build %install %make_install # Docs path fix mv %{buildroot}%{_docdir}/botan-%{version} %{buildroot}%{_pkgdocdir} rm -rf %{buildroot}%{_pkgdocdir}/handbook/{.doctrees,.buildinfo} # Remove shebang sed -e '1{/^#!/d}' -i %{buildroot}%{python3_sitearch}/botan%{major_version}.py # If installs python module in sitearch, move it to sitelib. The py package is noarch, loading the lib dynamically. %if "%{python3_sitelib}" != "%{python3_sitearch}" mkdir -p %{buildroot}%{python3_sitelib} mv %{buildroot}%{python3_sitearch}/botan%{major_version}.py %{buildroot}%{python3_sitelib}/botan%{major_version}.py %endif # The following mv are to prevent conflict with botan2 mv %{buildroot}%{_bindir}/botan %{buildroot}%{_bindir}/botan%{major_version} mv %{buildroot}%{_mandir}/man1/botan.1 %{buildroot}%{_mandir}/man1/botan%{major_version}.1 %files %license license.txt %dir %{_pkgdocdir} %{_pkgdocdir}/authors.txt %{_pkgdocdir}/news.txt %{_pkgdocdir}/pgpkey.txt %exclude %{_pkgdocdir}/license.txt %{_libdir}/libbotan-%{major_version}.so.9{,.*} %{_bindir}/botan%{major_version} %{_mandir}/man1/botan%{major_version}.1* %files devel %{_includedir}/botan-%{major_version} %{_libdir}/libbotan-%{major_version}.so %{_libdir}/pkgconfig/botan-%{major_version}.pc %files doc %license license.txt %dir %{_pkgdocdir} %{_pkgdocdir}/handbook %{_pkgdocdir}/doxygen %files -n python3-%{name} %pycached %{python3_sitelib}/%{name}.py %check LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test %changelog %autochangelog