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