Sophie

Sophie

distrib > Mageia > 6 > armv5tl > by-pkgid > 31303c55bdfade040a72cd84fe09300d > files > 8

botan-1.10.14-5.mga6.src.rpm

%global major_version 1.10

%global with_python3 1

Name:           botan
Version:        %{major_version}.14
Release:        5%{?dist}
Summary:        Crypto library written in C++
Group:          System/Libraries

License:        BSD
URL:            http://botan.randombit.net/
# tarfile is stripped using repack.sh. original tarfile to be found
# here: http://botan.randombit.net/releases/Botan-%%{version}.tgz
Source0:        Botan-%{version}.stripped.tar.gz
Source1:        README.mageia
Patch0:         botan-aarch64.patch
Patch1:         botan-1.10-add-ppc64le.patch
# Enable only cleared ECC algorithms
Patch2:         botan-1.10.5-ecc-fix.patch
# Make boost_python selectable
Patch3:         botan-boost_python.patch
# Fix wrong path
Patch4:         botan-1.10.13-python-init.patch

BuildRequires:  gcc-c++
BuildRequires:  python2
BuildRequires:  python2-devel
BuildRequires:  boost-devel
%if 0%{?with_python3}
BuildRequires:  python3
BuildRequires:  python3-devel
BuildRequires:  boost-devel
%endif # with_python3

BuildRequires:  python-sphinx
BuildRequires:  bzip2-devel
BuildRequires:  zlib-devel
BuildRequires:  openssl-devel

# do not check .so files in the python_sitelib directories
%global __provides_exclude_from ^(%{python2_sitearch}/.*\\.so)$
%if 0%{?with_python3}
%global __provides_exclude_from ^(%{python3_sitearch}/.*\\.so)$
%endif # with_python3

%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}

%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 \#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
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       pkgconfig
Requires:       bzip2-devel
Requires:       zlib-devel
Requires:       openssl-devel

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


%package        doc
Summary:        Documentation for %{name}
Group:          Documentation
BuildArch:      noarch

%description    doc
%{summary}

This package contains HTML documentation for %{name}.


%package -n python2-%{name}
Summary:        Python2 bindings for %{name}
%{?python_provide:%python_provide python2-%{name}}
# the python2 package was named botan-python up to 1.10.13-1
Provides:       %{name}-python = %{version}-%{release}
Obsoletes:      %{name}-python < 1.10.13-2

%description -n python2-%{name}
%{summary}

This package contains the Python2 binding for %{name}.

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

%if 0%{?with_python3}
%package -n python3-%{name}
Summary:        Python3 bindings for %{name}
%{?python_provide:%python_provide python3-%{name}}

%description -n python3-%{name}
%{summary}

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

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


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

# These tests will fail.
rm -rf checks/ec_tests.cpp

%build
# we have the necessary prerequisites, so enable optional modules
%global enable_modules bzip2,zlib,openssl

# fixme: maybe disable unix_procs, very slow.
%global disable_modules gnump

./configure.py \
        --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 \
        --with-sphinx

%if 0%{?with_python3}
cp -a build/python{,3}
%endif # with_python3

# (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="$(python2-config --includes)" \
     PYTHON_ROOT=.

%if 0%{?with_python3}
mv build/python{,2} ; mv build/python{3,}
make -f Makefile.python \
     CXX="g++ -std=c++11 ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} \
     PYTHON_INC="$(python3-config --includes)" \
     PYTHON_ROOT=. \
     BOOST_PYTHON=boost_python3
mv build/python{,3} ; mv build/python{2,}
%endif # with_python3

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

make -f Makefile.python install \
     PYTHON_SITE_PACKAGE_DIR=%{buildroot}%{python2_sitearch}

%if 0%{?with_python3}
mv build/python{,2} ; mv build/python{3,}
make -f Makefile.python install \
     PYTHON_SITE_PACKAGE_DIR=%{buildroot}%{python3_sitearch}
mv build/python{,3} ; mv build/python{2,}
%endif # with_python3

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


%post -p /sbin/ldconfig


%postun -p /sbin/ldconfig


%files
%dir %{_pkgdocdir}
%{_pkgdocdir}/readme.txt
%{_pkgdocdir}/README.mageia
%if 0%{?_licensedir:1}
%exclude %{_pkgdocdir}/license.txt
%license doc/license.txt
%else
%{_pkgdocdir}/license.txt
%endif # licensedir
%{_libdir}/libbotan-%{major_version}.so.*


%files devel
%{_pkgdocdir}/examples
%{_bindir}/botan-config-%{major_version}
%{_includedir}/*
%exclude %{_libdir}/libbotan-%{major_version}.a
%{_libdir}/libbotan-%{major_version}.so
%{_libdir}/pkgconfig/botan-%{major_version}.pc


%files doc
%dir %{_pkgdocdir}
%{_pkgdocdir}/manual
# next files duplicated on purpose, because -doc doesn't depend on the
# main package
%{_pkgdocdir}/readme.txt
%{_pkgdocdir}/README.mageia
%if 0%{?_licensedir:1}
%exclude %{_pkgdocdir}/license.txt
%license doc/license.txt
%else
%{_pkgdocdir}/license.txt
%endif # licensedir
%{_pkgdocdir}/python2-examples


%files -n python2-%{name}
%{python2_sitearch}/%{name}


%if 0%{?with_python3}
%files -n python3-%{name}
%{python3_sitearch}/%{name}
%endif # with_python3


%check
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





%changelog
* Mon Apr 24 2017 neoclust <neoclust> 1.10.14-5.mga5
+ Revision: 1097284
- New version 1.0.14 - Fixes CVE-2016-9132 (mga#20014)

* Wed May 18 2016 luigiwalser <luigiwalser> 1.10.12-3.mga6
+ Revision: 1016809
- add patch from debian to fix CVE-2015-7827 and CVE-2016-2849

* Sun Feb 28 2016 oden <oden> 1.10.12-2.mga6
+ Revision: 980480
- fix libname name (#17737)

* Thu Feb 11 2016 shlomif <shlomif> 1.10.12-1.mga6
+ Revision: 955553
- New version 1.10.12 with fixes for CVEs.
- See http://botan.randombit.net/#old-stable-series-1-10
- See http://botan.randombit.net/security.html
- See http://lwn.net/Vulnerabilities/675225/

* Thu Feb 11 2016 umeabot <umeabot> 1.10.8-6.mga6
+ Revision: 953545
- Mageia 6 Mass Rebuild

* Tue Aug 25 2015 ovitters <ovitters> 1.10.8-5.mga6
+ Revision: 869375
- rebuild for new gcc

* Wed Oct 15 2014 umeabot <umeabot> 1.10.8-4.mga5
+ Revision: 746315
- Second Mageia 5 Mass Rebuild

* Thu Sep 18 2014 umeabot <umeabot> 1.10.8-3.mga5
+ Revision: 693514
- Rebuild to fix library dependencies

* Tue Sep 16 2014 umeabot <umeabot> 1.10.8-2.mga5
+ Revision: 678207
- Mageia 5 Mass Rebuild

* Sun May 04 2014 shlomif <shlomif> 1.10.8-1.mga5
+ Revision: 620001
- New version 1.10.8

* Fri Oct 18 2013 luigiwalser <luigiwalser> 1.8.13-4.mga4
+ Revision: 503487
- fix typo in make check section

  + umeabot <umeabot>
    - Mageia 4 Mass Rebuild

  + dams <dams>
    - clean specfile

* Fri Jan 11 2013 umeabot <umeabot> 1.8.13-3.mga3
+ Revision: 347147
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

  + shlomif <shlomif>
    - imported package botan


* Thu Jul 21 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.13-2
- Patch to revert the soname change.

* Wed Jul 20 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.13-1
- Update to 1.8.13.

* Sat Jul  2 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.12-1
- Update to 1.8.12.

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Nov  6 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.11-1
- Update to 1.8.11.

* Sat Sep  4 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.10-1
- Update to 1.8.10.

* Sun Aug 29 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.9-4
- Update README.fedora.

* Fri Aug 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.9-3
- Also remove RC5 from the tarfile.
- Comment out RC5, RC6 and IDEA validation tests.

* Wed Aug  4 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.9-2
- Remove IDEA, RC6, and ECC-related modules from the tarfile,
  see bz 615372.

* Wed Jun 16 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.9-1
- Update to 1.8.9.
- Drop patch applied upstream.

* Thu Nov 19 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.8-2
- Add patch from upstream to build with binutils-2.20.51.0.2.
  Fixes bz 538949 (ftbfs).

* Thu Nov  5 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.8-1
- Update to 1.8.8, a bugfix release.

* Thu Sep 10 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.7-1
- Update to 1.8.7. This is mainly a bugfix release.

* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.8.6-2
- rebuilt with new openssl

* Thu Aug 13 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.6-1
- Update to 1.8.6, which contains new features as well as bugfixes,
  e.g. concerning the /proc-walking entropy source.

* Wed Aug 12 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.5-2
- Fix changelog.

* Wed Aug 12 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.5-1
- Update to 1.8.5.
- Use .tbz source file.
- Configuration script uses python now.

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sat Apr 25 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.2-1
- Update to 1.8.2.

* Mon Mar 16 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.1-4
- Add missing requirements to -devel package.

* Fri Feb 27 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.1-3
- Rebuilt again after failed attempt in mass rebuild.

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Jan 21 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.1-1
- Update to 1.8.1. This is a bugfix release, see
  http://botan.randombit.net/news/releases/1_8_1.html for changes.
- No need to explicitly enable modules that will be enabled by
  configure.pl anyway.

* Mon Jan 19 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.0-2
- Move api* and tutorial* doc files to -devel package.

* Sat Jan 17 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.0-1
- New package.