ALT repositories
Last updated at Fri, 24 Jul 2020 14:09:54 +0000 | SRPMs: 24140
en ru
SRPMs in branches
hide window
Group :: Development/C
Source RPM: libbotan1.10
Raw spec file

# BEGIN SourceDeps(oneline):
BuildRequires: perl( perl( perl(ExtUtils/ perl-devel
# END SourceDeps(oneline)

Group: Development/C
%add_optflags %optflags_shared
%define oldname botan
# see

%define _localstatedir %{_var}
%global major_version 1.10

Name: libbotan%{major_version}
Version: %{major_version}.17
Release: alt1_22
Summary: Crypto library written in C++

License: BSD
# tarfile is stripped using original tarfile to be found

# here:{version}.tgz

Source0: Botan-%{version}.stripped.tar.gz
Source1: README.fedora
# Enable only cleared ECC algorithms

Patch0: botan-1.10.5-ecc-fix.patch
# Make boost_python selectable

Patch1: botan-boost_python.patch
# Fix wrong path

Patch2: botan-1.10.13-python-init.patch

BuildRequires: gcc-c++
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-module-sphinx python3-module-sphinx-sphinx-build-symlink
BuildRequires: boost-asio-devel boost-context-devel boost-coroutine-devel boost-devel boost-devel-headers boost-filesystem-devel boost-flyweight-devel boost-geometry-devel boost-graph-parallel-devel boost-interprocess-devel boost-locale-devel boost-lockfree-devel boost-log-devel boost-math-devel boost-mpi-devel boost-msm-devel boost-polygon-devel boost-program_options-devel boost-python-headers boost-signals-devel boost-wave-devel
BuildRequires: bzlib-devel
BuildRequires: zlib-devel

# do not check .so files in the python_sitelib directories

%global __provides_exclude_from ^(%{python3_sitelibdir}/.*\\.so)$

%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{oldname}-%{version}}
Provides: botan-1.10 = %{version}-%{release}
Patch33: botan-1.10.17-alt-armh.patch

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 \#10 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.

%package devel
Group: Development/C
Summary: Development files for %{oldname}
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Provides: botan-1.10-devel = %{version}-%{release}

%description devel
The %{oldname}-devel package contains libraries and header files for
developing applications that use %{oldname}.

%package doc
Group: Development/C
Summary: Documentation for %{oldname}
BuildArch: noarch
Provides: botan-1.10-doc = %{version}-%{release}

%description doc

This package contains HTML documentation for %{oldname}.

%package -n python3-module-botan%{major_version}
Group: Development/C
Summary: Python3 bindings for %{oldname}
%{?python_provide:%python_provide python3-%{oldname}}

%description -n python3-module-botan%{major_version}

This package contains the Python3 binding for %{oldname}.

Note: The Python binding should be considered alpha software, and the
interfaces may change in the future.

%setup -q -n Botan-%{version}
%patch0 -p1 -b .eccfix
%patch1 -p1
%patch2 -p1

# These tests will fail.

rm -rf checks/ec_tests.cpp

%patch33 -p1


# we have the necessary prerequisites, so enable optional modules

%global enable_modules bzip2,zlib

# fixme: maybe disable unix_procs, very slow.

%global disable_modules gnump

%{__python3} ./ \
--prefix=%{_prefix} \
--libdir=%{_lib} \
--cc=gcc \
--os=linux \
--cpu=%{_arch} \
--enable-modules=%{enable_modules} \
--disable-modules=%{disable_modules} \
--with-boost-python \
--with-python-version=dummy.dummy \

# (ab)using CXX as an easy way to inject our CXXFLAGS

make CXX="g++ -std=c++11 ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags}

make -f Makefile.python \
CXX="g++ -std=c++11 ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} \
PYTHON_INC="$(python3-config --includes)" \

make install \
DESTDIR=%{buildroot}%{_prefix} \
DOCDIR=%{buildroot}%{_docdir}/%{oldname} \
INSTALL_CMD_EXEC="install -p -m 755" \
INSTALL_CMD_DATA="install -p -m 644"

make -f Makefile.python install \

# fixups

find doc/examples -type f -exec chmod -x {} \;
mv doc/examples/python doc/python2-examples
cp -a doc/{examples,python2-examples,license.txt} \
cp -a %{SOURCE1} %{buildroot}%{_docdir}/%{oldname}
rm -r %{buildroot}%{_docdir}/%{oldname}/manual/{.doctrees,.buildinfo}

%dir %{_docdir}/%{oldname}
%if 0%{?_licensedir:1}
%exclude %{_docdir}/%{oldname}/license.txt
%doc --no-dereference doc/license.txt
%endif # licensedir

%files devel
%exclude %{_libdir}/libbotan-%{major_version}.a

%files doc
%dir %{_docdir}/%{oldname}
# next files duplicated on purpose, because -doc doesn't depend on the

# main package

%if 0%{?_licensedir:1}
%exclude %{_docdir}/%{oldname}/license.txt
%doc --no-dereference doc/license.txt
%endif # licensedir

%files -n python3-module-botan%{major_version}

make CXX="g++ -std=c++11 ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} check

# these checks would fail

mv checks/validate.dat{,.orig}
awk '/\[.*\]/{f=0} /\[(RC5.*|RC6)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \
checks/validate.dat.orig > checks/validate.dat
LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate

* Thu Nov 05 2020 Igor Vlasenko <viy at> 1.10.17-alt1_22
- to Sisyphus as code-editor dep

The Geyser project is based on code from Prometheus2.0, which had been made available under the MIT License.