%define name libcryptopp %define version 5.2.1 %define release 2mdk %define major 5 %define libname %mklibname cryptopp %{major} Name: %{name} Summary: Free C++ class library of cryptographic schemes. Version: %{version} Release: %{release} License: Public Domain Group: System/Libraries URL: http://www.cryptopp.com Source: http://www.eskimo.com/~weidai/cryptopp521.zip Patch0: crypto-5.2.patch.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Buildrequires: unzip %description Crypto++ Library is a free 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 Provides: %{name}-devel = %version-%release Obsoletes: %{name}-devel %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 %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++ BuildRequires: doxygen %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 -c -n %{name}-%{version} %patch0 -p1 %__chmod 755 configure CXXFLAGS="-O0 -pipe" %configure %build %make %__mkdir_p tmp %__cp -a *.dat TestVectors/* tmp (cd tmp && ../cryptest v) %__rm -rf tmp doxygen %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 * 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