Update to 1.10.5.

- Modernize spec file.
- New -doc subpackage containing HTML documentation.
- Package Python binding.
This commit is contained in:
Thomas Moschny 2013-07-26 04:32:34 +02:00
parent 59e089da3e
commit a180054edb
6 changed files with 97 additions and 64 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/Botan-1.8.12.stripped.tbz /Botan-1.8.12.stripped.tbz
/Botan-1.8.13.stripped.tbz /Botan-1.8.13.stripped.tbz
/Botan-1.8.14.stripped.tbz /Botan-1.8.14.stripped.tbz
/Botan-1.10.5.stripped.tbz

View File

@ -1,14 +1,13 @@
For legal reasons, the following modules have been completely removed For legal reasons, the following modules have been completely removed
from the Botan package in Fedora: from the Botan package in Fedora:
* Block Ciphers * IDEA Block Cipher [src/block/idea, src/block/idea_sse2]
* IDEA [src/block/idea] * RC5 Block Cipher [src/block/rc5]
* RC6 [src/block/rc6] * RC6 Block Cipher [src/block/rc6]
* RC5 [src/block/rc5] * GF(p) Math [src/math/ec_gfp]
* Public Key Base * ECC Domain Parameters [src/pubkey/ec_group]
* ECC Public Key [src/pubkey/ecc_key] * ECC Public Key [src/pubkey/ecc_key]
* ECC Domain Parameters [src/pubkey/ec_dompar] * ECDH [src/pubkey/ecdh]
* ECDSA [src/pubkey/ecdsa] * ECDSA [src/pubkey/ecdsa]
* ECKAEG [src/pubkey/eckaeg] * GOST 34.10 [src/pubkey/gost_3410]
* Math * SRP-6 [src/constructs/srp6]
* GF(p) Math [src/math/gfpmath]

View File

@ -1,19 +0,0 @@
#
# old_revision [adcf24b7e258c125f78aaff4ef2d3557f1183c3e]
#
# patch "configure.py"
# from [b43917e0e74e7ef1ff0024542da0dabe104a1582]
# to [ba82e657a585f31e9ba20056a57c5f597c0f0297]
#
============================================================
--- configure.py b43917e0e74e7ef1ff0024542da0dabe104a1582
+++ configure.py ba82e657a585f31e9ba20056a57c5f597c0f0297
@@ -38,7 +38,7 @@ class BuildConfigurationInformation(obje
version_major = 1
version_minor = 8
version_patch = 14
- version_so_patch = 13
+ version_so_patch = 2
version_suffix = ''
version_string = '%d.%d.%d%s' % (

View File

@ -1,6 +1,8 @@
%global major_version 1.10
Name: botan Name: botan
Version: 1.8.14 Version: %{major_version}.5
Release: 2%{?dist} Release: 1%{?dist}
Summary: Crypto library written in C++ Summary: Crypto library written in C++
Group: System Environment/Libraries Group: System Environment/Libraries
@ -10,18 +12,20 @@ URL: http://botan.randombit.net/
# here: http://files.randombit.net/botan/Botan-%%{version}.tbz # here: http://files.randombit.net/botan/Botan-%%{version}.tbz
Source0: Botan-%{version}.stripped.tbz Source0: Botan-%{version}.stripped.tbz
Source1: README.fedora Source1: README.fedora
# soname was changed unintentionally upstream, revert it.
Patch0: botan-1.8.14-soname.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: python BuildRequires: python
BuildRequires: python-sphinx
BuildRequires: python-devel
BuildRequires: boost-python-devel
BuildRequires: bzip2-devel BuildRequires: bzip2-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: gmp-devel BuildRequires: gmp-devel
BuildRequires: openssl-devel BuildRequires: openssl-devel
# do not check .so files in the python_sitelib directory
%global __provides_exclude_from ^(%{python_sitearch}/.*\\.so)$
%description %description
Botan is a BSD-licensed crypto library written in C++. It provides a Botan is a BSD-licensed crypto library written in C++. It provides a
@ -35,24 +39,47 @@ flavor of the library.
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig Requires: pkgconfig
Requires: bzip2-devel Requires: bzip2-devel
Requires: zlib-devel Requires: zlib-devel
Requires: gmp-devel Requires: gmp-devel
Requires: openssl-devel Requires: openssl-devel
%description devel %description devel
The %{name}-devel package contains libraries and header files for The %{name}-devel package contains libraries and header files for
developing applications that use %{name}. 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 python-%{name}
Summary: Python bindings for %{name}
Group: System Environment/Libraries
%description -n python-%{name}
%{summary}
This package contains the Python binding for %{name}.
Note: The Python binding should be considered alpha software, and the
interfaces may change in the future.
%prep %prep
%setup -q -n Botan-%{version} %setup -q -n Botan-%{version}
%patch0 -p0
cp -av %{SOURCE1} . cp -av %{SOURCE1} .
%build %build
# we have the necessary prerequisites, so enable optional modules # we have the necessary prerequisites, so enable optional modules
%define enable_modules gnump,bzip2,zlib,openssl %define enable_modules gnump,bzip2,zlib,openssl
@ -67,23 +94,31 @@ cp -av %{SOURCE1} .
--os=linux \ --os=linux \
--cpu=%{_arch} \ --cpu=%{_arch} \
--enable-modules=%{enable_modules} \ --enable-modules=%{enable_modules} \
--disable-modules=%{disable_modules} --disable-modules=%{disable_modules} \
--with-boost-python \
--with-python-version=%{python_version}
# (ab)using CXX as an easy way to inject our CXXFLAGS # (ab)using CXX as an easy way to inject our CXXFLAGS
make CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} make CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags}
make -f Makefile.python \
CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags}
%install %install
rm -rf %{buildroot}
make install \ make install \
DESTDIR=%{buildroot}%{_prefix} \ DESTDIR=%{buildroot}%{_prefix} \
DOCDIR=_doc \ DOCDIR=_doc \
INSTALL_CMD_EXEC="install -p -m 755" \ INSTALL_CMD_EXEC="install -p -m 755" \
INSTALL_CMD_DATA="install -p -m 644" \ INSTALL_CMD_DATA="install -p -m 644"
make -f Makefile.python install \
PYTHON_SITE_PACKAGE_DIR=%{buildroot}%{python_sitearch}
%clean # fixups
rm -rf %{buildroot} find doc/examples -type f -exec chmod -x {} \;
mv doc/examples/python doc/python-examples
rm _doc/manual/.buildinfo
rm -r _doc/manual/.doctrees
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
@ -93,22 +128,30 @@ rm -rf %{buildroot}
%files %files
%defattr(-,root,root,-) %doc _doc/readme.txt
%{_libdir}/libbotan*-*.so %doc doc/license.txt
%doc _doc/readme.txt _doc/log.txt _doc/thanks.txt _doc/credits.txt
%doc _doc/license.txt _doc/fips140.tex _doc/pgpkeys.asc
%doc README.fedora %doc README.fedora
%{_libdir}/libbotan-%{major_version}.so.*
%files devel %files devel
%defattr(-,root,root,-)
%doc doc/examples %doc doc/examples
%doc _doc/api* _doc/tutorial* %{_bindir}/botan-config-%{major_version}
%{_bindir}/botan-config
%{_includedir}/* %{_includedir}/*
%exclude %{_libdir}/libbotan.a %exclude %{_libdir}/libbotan-%{major_version}.a
%{_libdir}/libbotan.so %{_libdir}/libbotan-%{major_version}.so
%{_libdir}/pkgconfig/botan-1.8.pc %{_libdir}/pkgconfig/botan-%{major_version}.pc
%files doc
%doc _doc/manual
%doc _doc/readme.txt
%doc doc/license.txt
%files -n python-%{name}
%doc doc/python-examples
%{python_sitearch}/%{name}
%check %check
@ -116,12 +159,18 @@ make CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} check
# these checks would fail # these checks would fail
mv checks/validate.dat{,.orig} mv checks/validate.dat{,.orig}
awk '/\[.*\]/{f=0} /\[(RC5.*|RC6|IDEA)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \ awk '/\[.*\]/{f=0} /\[(RC5.*|RC6|IDEA.*)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \
checks/validate.dat.orig > checks/validate.dat checks/validate.dat.orig > checks/validate.dat
LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate
%changelog %changelog
* Fri Jul 26 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.10.5-1
- Update to 1.10.5.
- Modernize spec file.
- New -doc subpackage containing HTML documentation.
- Package Python binding.
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.14-2 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

View File

@ -1,6 +1,6 @@
#! /bin/bash #! /bin/bash
version=1.8.14 version=1.10.5
name=Botan-${version} name=Botan-${version}
suffix=.tbz suffix=.tbz
newsuffix=.stripped.tbz newsuffix=.stripped.tbz
@ -11,13 +11,16 @@ tmpfile=$(mktemp)
${compr} -cd ${name}${suffix} > ${tmpfile} ${compr} -cd ${name}${suffix} > ${tmpfile}
tar --delete --file=${tmpfile} ./Botan-${version}/src/block/idea tar --delete --file=${tmpfile} Botan-${version}/src/block/idea
tar --delete --file=${tmpfile} ./Botan-${version}/src/block/rc6 tar --delete --file=${tmpfile} Botan-${version}/src/block/idea_sse2
tar --delete --file=${tmpfile} ./Botan-${version}/src/block/rc5 tar --delete --file=${tmpfile} Botan-${version}/src/block/rc6
tar --delete --file=${tmpfile} ./Botan-${version}/src/math/gfpmath tar --delete --file=${tmpfile} Botan-${version}/src/block/rc5
tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/ec_dompar tar --delete --file=${tmpfile} Botan-${version}/src/math/ec_gfp
tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/ecc_key tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecc_key
tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/ecdsa tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecdh
tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/eckaeg tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecdsa
tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ec_group
tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/gost_3410
tar --delete --file=${tmpfile} Botan-${version}/src/constructs/srp6
${compr} -c ${tmpfile} > ${name}${newsuffix} ${compr} -c ${tmpfile} > ${name}${newsuffix}

View File

@ -1 +1 @@
4b5ce78b1cfc0735eb7ec4f6903068ca Botan-1.8.14.stripped.tbz dcc2a74f56c617add323df4ae175c1a5 Botan-1.10.5.stripped.tbz