Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > de553912cbf55c3751d8ec544ec1de60 > files > 7

libcryptopp-5.6.2-4.1.mga5.src.rpm

%define major   6
%define libname %mklibname cryptopp %{major}
%define develname %mklibname -d cryptopp
%define staticname %mklibname -s -d cryptopp
%define fver %(echo %version |sed s/\\\\.//g)

Name:		libcryptopp
Version:	5.6.2
%define subrel	1
Release:	%mkrel 4
Epoch:		0
Summary:	C++ class library of cryptographic schemes
License:	Boost Software License 1.0
Group:		System/Libraries
URL:		http://www.cryptopp.com
Source0:	http://www.cryptopp.com/cryptopp%{fver}.zip
Source1:	cryptopp.pc
Patch0:		cryptopp-5.6.2-autotools.patch
# Debian patch installs TestVectors and TestData in /usr/share/cryptopp/
# http://groups.google.com/group/cryptopp-users/browse_thread/thread/6fe2192340f07e5d
Patch2:		cryptopp-5.6.2-data-files-location.patch
# Enable SSE2 only on x86_64
Patch3:		cryptopp-5.6.2-x86-disable-sse2.patch
Patch4:		cryptopp-5.6.2-CVE-2015-2141.patch
BuildRequires:	doxygen

%description
Crypto++ Library is a C++ class library of cryptographic schemes.
Currently the library consists of the following features:

    * 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, TEA, XTEA,
      SAFER, 3-WAY, GOST, SHARK, CAST-128, Square, Skipjack, Camellia,
      SHACAL-2
    * generic block cipher modes: ECB, CBC, CBC ciphertext stealing
      (CTS), CFB, OFB, counter mode (CTR)
    * stream ciphers: Salsa20, 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, PSS,
      PSSR, IEEE P1363 EMSA2 and EMSA5
    * 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-128,
      RIPEMD-256, RIPEMD-160, RIPEMD-320, Tiger, SHA-2 (SHA-224,
      SHA-256, SHA-384, and SHA-512), Panama, WHIRLPOOL
    * message authentication codes: MD5-MAC, HMAC, XOR-MAC, CBC-MAC,
      DMAC, Two-Track-MAC
    * 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,
    * 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


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

%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 %develname
Summary:	Header files and development documentation for %{name}
Group:		Development/C++
Requires:	%{libname} = %{epoch}:%{version}-%{release}
Provides:	%{name}-devel = %{epoch}:%{version}-%{release}
Provides:	%{_lib}cryptopp-devel = %{epoch}:%{version}-%{release}
Provides:	cryptopp-devel = %{epoch}:%{version}-%{release}
Obsoletes:	%mklibname -d cryptopp 6

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

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

%package progs
Summary:	Programs for manipulating %{name} routines
Group:		Development/Other
Provides:	cryptopp-progs = %{epoch}:%{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 -c
%apply_patches

rm -f GNUmakefile

perl -pi -e 's/\r$//g' License.txt Readme.txt

%build
autoreconf -vfi
%configure2_5x --disable-static
%make

doxygen

%install
%makeinstall_std

#we don't want these
find %{buildroot} -name '*.la' -delete

# Install the pkg-config file
install -D -m644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/cryptopp.pc

# Fill in the variables
sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/cryptopp.pc
sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/cryptopp.pc
sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/cryptopp.pc

mkdir -p %{buildroot}%{_datadir}/%{name}/TestVectors
mkdir -p %{buildroot}%{_datadir}/%{name}/TestData
install -m644 TestVectors/* %{buildroot}%{_datadir}/%{name}/TestVectors
install -m644 TestData/* %{buildroot}%{_datadir}/%{name}/TestData

rm -f %{buildroot}%{_bindir}/cryptestcwd

%check
./cryptestcwd v

%files -n %{libname}
%doc License.txt Readme.txt
%{_libdir}/*.so.%{major}*

%files -n %develname
%{_includedir}/cryptopp
%{_libdir}/*.so
%{_libdir}/pkgconfig/cryptopp.pc

%files progs
%attr(0755,root,root) %{_bindir}/cryptest
%{_datadir}/libcryptopp


%changelog
* Mon Jul 20 2015 luigiwalser <luigiwalser> 0:5.6.2-4.1.mga5
+ Revision: 855776
- add patch from fedora to fix CVE-2015-2141

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

* Tue Sep 16 2014 umeabot <umeabot> 0:5.6.2-3.mga5
+ Revision: 681391
- Mageia 5 Mass Rebuild

* Sat Oct 19 2013 umeabot <umeabot> 0:5.6.2-2.mga4
+ Revision: 528071
- Mageia 4 Mass Rebuild

* Sat Jun 15 2013 wally <wally> 0:5.6.2-1.mga4
+ Revision: 443415
- new version 5.6.2
- sync patches with Fedora
- drop s390 patch as we don't support it
- clean .spec a bit

* Sat Jan 12 2013 umeabot <umeabot> 0:5.6.1-4.mga3
+ Revision: 356933
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Jan 07 2013 tv <tv> 0:5.6.1-3.mga3
+ Revision: 341236
- shrink description

* Mon Jan 07 2013 sander85 <sander85> 0:5.6.1-2.mga3
+ Revision: 341137
- Fix build with GCC 4.7

* Sun May 08 2011 dmorgan <dmorgan> 0:5.6.1-1.mga1
+ Revision: 95944
- New version 5.6.1
- imported package libcryptopp