Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > by-pkgid > 645e904adb4555c44d226e94eee85d46 > files > 4

libcryptopp-5.3-0.20060518.1mdk.src.rpm

%define name		libcryptopp
%define version		5.3
%define release		0.20060518.1

%define	major		5
%define	libname		%mklibname cryptopp %{major}

Name:			%{name}
Summary:		Public domain C++ class library of cryptographic schemes
Version:		%{version}
Release:		%mkrel %{release}
License:		Public Domain
Group:			System/Libraries
URL:			http://www.cryptopp.com/
Source0:		c5.tar.bz2
Patch0:			%{name}-autotools.patch.bz2
Patch1:			%{name}-amd64.patch.bz2
BuildRequires:		doxygen
BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
Crypto++ Library is a public domain C++ class library of cryptographic 
schemes. Currently the library consists of the following, some of which 
are other people's code, repackaged into classes.

* a class hierarchy with an API defined by abstract base classes
* AES (Rijndael) and AES candidates: RC6, MARS, Twofish, Serpent, 
  CAST-256
* other symmetric block ciphers: IDEA, DES, Triple-DES (DES-EDE2 and 
  DES-EDE3), DESX (DES-XEX3), RC2, RC5, Blowfish, Diamond2, TEA, SAFER, 
  3-WAY, GOST, SHARK, CAST-128, Square, Skipjack
* generic cipher modes: ECB, CBC, CBC ciphertext stealing (CTS), CFB, 
  OFB, counter mode (CTR)
* stream ciphers: Panama, ARC4, SEAL, WAKE, WAKE-OFB, BlumBlumShub
* public key cryptography: RSA, DSA, ElGamal, Nyberg-Rueppel (NR), 
  Rabin, Rabin-Williams (RW), LUC, LUCELG, DLIES (variants of DHAES), 
  ESIGN
* padding schemes for public-key systems: PKCS#1 v2.0, OAEP, PSSR, 
  IEEE P1363 EMSA2
* key agreement schemes: Diffie-Hellman (DH), Unified Diffie-Hellman 
  (DH2), Menezes-Qu-Vanstone (MQV), LUCDIF, XTR-DH
* elliptic curve cryptography: ECDSA, ECNR, ECIES, ECDH, ECMQV
* one-way hash functions: SHA-1, MD2, MD4, MD5, HAVAL, RIPEMD-160, Tiger, 
  SHA-2 (SHA-256, SHA-384, and SHA-512), Panama
* message authentication codes: MD5-MAC, HMAC, XOR-MAC, CBC-MAC, DMAC
* cipher constructions based on hash functions: Luby-Rackoff, MDC
* pseudo random number generators (PRNG): ANSI X9.17 appendix C, 
  PGP's RandPool
* password based key derivation functions: PBKDF1 and PBKDF2 from PKCS #5
* Shamir's secret sharing scheme and Rabin's information dispersal 
  algorithm (IDA)
* DEFLATE (RFC 1951) compression/decompression with gzip (RFC 1952) and zlib 
  (RFC 1950) format support
* fast multi-precision integer (bignum) and polynomial operations, with SSE2 
  optimizations for Pentium 4 processors
* finite field arithmetics, including GF(p) and GF(2^n)
* prime number generation and verification
* various miscellaneous modules such as base 64 coding and 32-bit CRC
* class wrappers for these operating system features (optional):
          o high resolution timers on Windows, Unix, and MacOS
          o Berkeley and Windows style sockets
          o Windows named pipes
          o /dev/random and /dev/urandom on Linux and FreeBSD
          o Microsoft's CryptGenRandom on Windows 
* A high level interface for most of the above, using a filter/pipeline 
  metaphor
* benchmarks and validation testing
* FIPS 140-2 Validated 

One purpose of Crypto++ is to act as a repository of public domain 
(not copyrighted) source code. Although the library is copyrighted as a 
compilation, the individual files in it (except for a few exceptions listed in 
the license) are in the public domain.

%package -n %{libname}
Group:		System/Libraries
Summary: 	Base shared library part of %{name}
Provides:	%{name} = %{version}-%{release}
Obsoletes:	%{name}

%description -n %libname
Crypto++ Library is a free C++ class library of cryptographic schemes.

This package contains the library needed to run programs dynamically
linked with %{name}.

%package -n %{libname}-devel
Summary:	Header files and development documentation for %{name}
Group:		Development/C++
Requires:	%{libname} = %{version}-%{release}
Obsoletes:	%{name}-devel
Provides:	%{name}-devel = %{version}-%{release}
Provides:	%{_lib}cryptopp-devel = %{version}-%{release}

%description -n %{libname}-devel
Crypto++ Library is a free C++ class library of cryptographic schemes.

This package contains the header files and development documentation
for %{name}.

%package -n %{libname}-static-devel
Summary:        Static libraries for programs which will use %{name}
Group:          Development/C++
Requires:       %{libname}-devel = %{version}-%{release}
Provides:	%{name}-static-devel = %{version}-%{release}
Provides:	%{_lib}cryptopp-static-devel = %{version}-%{release}

%description -n %{libname}-static-devel
Crypto++ Library is a free C++ class library of cryptographic schemes.

This package contains the static library for %{name}.

%package doc
Summary:        Documentation for %{name}
Group:          Development/C++

%description doc
Crypto++ Library is a free C++ class library of cryptographic schemes.

This package contains documentation for %{name}.

%package progs
Summary:        Programs for manipulating %{name} routines
Group:          Development/Other
Requires:       %{libname} = %{version}-%{release}
Provides:       %{name}-progs = %{version}-%{release}

%description progs
Crypto++ Library is a free C++ class library of cryptographic schemes.

This package contains programs for manipulating %{name} routines.

%prep
%setup -q -n c5
%{__rm} -f GNUmakefile
%patch0 -p1
%ifarch x86_64
%patch1 -p1
%endif
%{__perl} -pi -e 's/__cdecl/CRYPTOPP_API/g;s/__declspec\(dllexport\)/CRYPTOPP_DLL/g' test.cpp dlltest.cpp
%{_bindir}/autoreconf --verbose --force --install
%configure2_5x

%build
%make
%{_bindir}/doxygen

%check
%{__mkdir_p} tmp
%{__cp} -a *.dat TestVectors/* tmp
(cd tmp && ../cryptest v > cryptest.log 2>&1 && test ! `egrep -q '^FAILED' cryptest.log` || exit 1)
%{__rm} -rf tmp

%install
%{__rm} -rf %{buildroot}
%makeinstall

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%clean
%{__rm} -rf %{buildroot}

%files -n %libname
%defattr(-,root,root)
%doc License.txt Readme.txt
%{_libdir}/*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%{_includedir}/cryptopp
%{_libdir}/*.so
%{_libdir}/*.la

%files -n %{libname}-static-devel
%defattr(-,root,root)
%{_libdir}/*.a

%files doc
%defattr(-,root,root)
%doc doc/html/*

%files progs
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/cryptopp


%changelog
* Thu May 18 2006 David Walluck <walluck@mandriva.org> 0:5.3-0.20060518.1mdk
- CVS (20060518)
- enable standard CXXFLAGS
- disable P4 and SSE2 optimizations on x86-64

* Mon Aug 15 2005 David Walluck <walluck@mandriva.org> 0:5.3-0.20050714.1mdk
- 5.3 (CVS 20050714)
- patch (from cryptopp mailing list) to compile with GCC4
- BuildRequires: doxygen

* Sun Nov 07 2004 David Walluck <walluck@mandrake.org> 5.2.1-2mdk
- add doc package containing API documentation
- disable all optimizations to prevent miscompilation
- [DIRM]
- no need to add the same docs to every package

* Sat Jul 24 2004 Pierre-Michel Theveny <pmth@free.fr> 5.2.1-1mdk
- Updated to 5.2.1
- Change compile options to pass cryptest on 5.2.1

* Wed Jul 14 2004 Pierre-Michel Theveny <pmth@free.fr> 5.2-1mdk
- Updated to 5.2

* Mon Mar 01 2004 Lenny Cartier <lenny@mandrakesoft.com> 5.1-1mdk
- from Pierre-Michel Theveny <pmth@free.fr> :
	- Fixed problem with broken library (do not use -O2 !)
	- Added patch for GNU autotools and libtool support
	- Added package progs

* Wed Feb 19 2004 Pierre-Michel Theveny <pmth@free.fr> 5.1-1mdk
- Ported to Mandrake 9.2
- Added shared library

* Tue Feb 18 2004 Ariano Bertacca <ariano@hirnriss.net> 5.1-1
- released libcryptopp-5.1-1