0841eb1
Name:           cryptopp
62c3039
Version:        5.6.1
0804940
Release:        5%{?dist}
0841eb1
Summary:        Public domain C++ class library of cryptographic schemes
0841eb1
License:        Public Domain
0841eb1
Group:          System Environment/Libraries
0841eb1
URL:            http://www.cryptopp.com/
5c4f6f4
Source0:        http://www.cryptopp.com/cryptopp561.zip
62c3039
Source1:        cryptopp.pc
62c3039
Patch0:         cryptopp-5.6.1-autotools.patch
62c3039
Patch1:         cryptopp-5.6.1-s390.patch
9a12c8d
# Debian patch installs TestVectors and TestData in /usr/share/cryptopp/
9a12c8d
# http://groups.google.com/group/cryptopp-users/browse_thread/thread/6fe2192340f07e5d
9a12c8d
Patch2:         cryptopp-data-files-location.patch
bca12f3
# Enable SSE2 only on x86_64
bca12f3
Patch3:         cryptopp-x86-disable-sse2.patch
0841eb1
BuildRequires:  doxygen, autoconf, libtool
0841eb1
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0841eb1
0841eb1
%description
aff87fe
Crypto++ Library is a free C++ class library of cryptographic schemes.
0841eb1
See http://www.cryptopp.com/ for a list of supported algorithms.
0841eb1
aff87fe
One purpose of Crypto++ is to act as a repository of public domain
aff87fe
(not copyrighted) source code. Although the library is copyrighted as a
aff87fe
compilation, the individual files in it are in the public domain.
0841eb1
0841eb1
0841eb1
%package devel
0841eb1
Summary:        Header files and development documentation for %{name}
0841eb1
Group:          Development/Libraries
0841eb1
Requires:       %{name} = %{version}-%{release}
4a06c79
Requires:       pkgconfig
0841eb1
%description devel
0841eb1
Crypto++ Library is a free C++ class library of cryptographic schemes.
0841eb1
0841eb1
This package contains the header files and development documentation
0841eb1
for %{name}.
0841eb1
0841eb1
%package doc
0841eb1
Summary:        Documentation for %{name}
0841eb1
Group:          Documentation
5c4f6f4
BuildArch:      noarch
0841eb1
0841eb1
%description doc
0841eb1
Crypto++ Library is a free C++ class library of cryptographic schemes.
0841eb1
0841eb1
This package contains documentation for %{name}.
0841eb1
0841eb1
%package progs
0841eb1
Summary:        Programs for manipulating %{name} routines
0841eb1
Group:          Development/Tools
62c3039
Requires:       %{name} = %{version}-%{release}
0841eb1
0841eb1
%description progs
0841eb1
Crypto++ Library is a free C++ class library of cryptographic schemes.
0841eb1
0841eb1
This package contains programs for manipulating %{name} routines.
0841eb1
0841eb1
%prep
5c4f6f4
%setup -q -c
0841eb1
rm -f GNUmakefile
0841eb1
%patch0 -p1
62c3039
%patch1 -p1 -b .s390
9a12c8d
%patch2 -p1
bca12f3
%patch3
0841eb1
autoreconf --verbose --force --install
0841eb1
perl -pi -e 's/\r$//g' License.txt Readme.txt
0841eb1
0841eb1
%build
9a12c8d
%configure --disable-static
9a12c8d
0841eb1
make %{?_smp_mflags}
0841eb1
doxygen
0841eb1
0841eb1
%install
0841eb1
rm -rf $RPM_BUILD_ROOT
4a06c79
0841eb1
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c "
0841eb1
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
0841eb1
5c4f6f4
# Install the pkg-config file
5c4f6f4
install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/cryptopp.pc
5c4f6f4
# Fill in the variables
5c4f6f4
sed -i "s|@PREFIX@|%{_prefix}|g" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/cryptopp.pc
5c4f6f4
sed -i "s|@LIBDIR@|%{_libdir}|g" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/cryptopp.pc
5c4f6f4
sed -i "s|@INCLUDEDIR@|%{_includedir}|g" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/cryptopp.pc
5c4f6f4
9a12c8d
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/TestVectors
9a12c8d
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/TestData
9a12c8d
install -m644 TestVectors/* $RPM_BUILD_ROOT%{_datadir}/%{name}/TestVectors
9a12c8d
install -m644 TestData/* $RPM_BUILD_ROOT%{_datadir}/%{name}/TestData
9a12c8d
9a12c8d
rm -f $RPM_BUILD_ROOT%{_bindir}/cryptestcwd
9a12c8d
0841eb1
%check
9a12c8d
./cryptestcwd v
0841eb1
0841eb1
%clean
0841eb1
rm -rf $RPM_BUILD_ROOT
0841eb1
0841eb1
%post -p /sbin/ldconfig
0841eb1
0841eb1
%postun -p /sbin/ldconfig
0841eb1
0841eb1
%files
0841eb1
%defattr(0644,root,root,0755)
0841eb1
%doc License.txt Readme.txt
0841eb1
%defattr(-,root,root,0755)
5c4f6f4
%{_libdir}/libcryptopp.so.6*
0841eb1
0841eb1
%files devel
0841eb1
%defattr(0644,root,root,0755)
0841eb1
%{_includedir}/cryptopp
0841eb1
%defattr(-,root,root,0755)
5c4f6f4
%{_libdir}/libcryptopp.so
62c3039
%{_libdir}/pkgconfig/cryptopp.pc
0841eb1
0841eb1
%files doc
0841eb1
%defattr(0644,root,root,0755)
0841eb1
%doc doc/html/*
0841eb1
0841eb1
%files progs
0841eb1
%defattr(0644,root,root,0755)
0841eb1
%attr(0755,root,root) %{_bindir}/cryptest
9a12c8d
%{_datadir}/%{name}
0841eb1
0841eb1
0841eb1
%changelog
0804940
* Mon Oct 17 2011 Alexey Kurov <nucleo@fedoraproject.org> - 5.6.1-5
0804940
- remove includedir in cryptopp.pc
0804940
45cb804
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.6.1-4
45cb804
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
45cb804
bca12f3
* Sun Jan 23 2011 Alexey Kurov <nucleo@fedoraproject.org> - 5.6.1-3
bca12f3
- patch config.h for enable SSE2 only on x86_64
bca12f3
9a12c8d
* Thu Oct 21 2010 Alexey Kurov <nucleo@fedoraproject.org> - 5.6.1-2
9a12c8d
- add -DCRYPTOPP_DISABLE_SSE2 to CXXFLAGS instead of config.h for non-x86_64 (rhbz#645169)
9a12c8d
- install TestVectors and TestData in cryptopp-progs
9a12c8d
- patch cryptest for using data files in /usr/share/cryptopp
9a12c8d
- build cryptestcwd for build time test only
9a12c8d
- fix check section
9a12c8d
5c4f6f4
* Wed Sep  1 2010 Alexey Kurov <nucleo@fedoraproject.org> - 5.6.1-1
5c4f6f4
- Crypto++ 5.6.1
5c4f6f4
- fixed pkgconfig file installation
5c4f6f4
- build cryptopp-doc as noarch subpkg
5c4f6f4
62c3039
* Thu Nov 26 2009 Alexey Kurov <nucleo@fedoraproject.org> - 5.6.1-0.1.svn479
62c3039
- svn r479. MARS placed in the public domain by Wei Dai
62c3039
- Fixes rhbz#539227
62c3039
7037653
* Fri Oct 30 2009 Rahul Sundaram <sundaram@fedoraproject.org> 5.6.0-5
7037653
- Fix source
7037653
4a06c79
* Wed Oct 28 2009 Rahul Sundaram <sundaram@fedoraproject.org> 5.6.0-4
4a06c79
- Add pkgconfig file. Fixes rhbz#512761
4a06c79
5b80dd0
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.6.0-3
5b80dd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
5b80dd0
8932931
* Tue Jun  9 2009 Dan Horak <dan[at]dannu.cz> 5.6.0-2
8932931
- add support for s390/s390x
8932931
e022913
* Sun Mar 15 2009 Aurelien Bompard <abompard@fedoraproject.org> 5.6.0-1
e022913
- version 5.6.0
e022913
- rediff patches
e022913
d2f8b2d
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.5.2-4
d2f8b2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
d2f8b2d
0841eb1
* Tue Sep 30 2008 Aurelien Bompard <abompard@fedoraproject.org> 5.5.2-3
0841eb1
- purge source archive from patented code
0841eb1
- use SSE2 on x86_64
0841eb1
- preserve timestamps on install
0841eb1
0841eb1
* Mon Sep 22 2008 Aurelien Bompard <abompard@fedoraproject.org> 5.5.2-2
0841eb1
- rediff gcc 4.3 patch
0841eb1
0841eb1
* Wed Aug 27 2008 Aurelien Bompard <abompard@fedoraproject.org> 5.5.2-1
0841eb1
- adapt to fedora, from Mandriva