0841eb1
Name:           cryptopp
b0467c5
Version:        5.6.1
b0467c5
Release:        0.1.svn479%{?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/
b0467c5
#Source0:        http://www.cryptopp.com/cryptopp560.zip
b0467c5
b0467c5
# The source for this package was pulled from upstream's vcs.
b0467c5
# Use the following commands to generate the tarball:
b0467c5
#  svn export -r 479 https://cryptopp.svn.sourceforge.net/svnroot/cryptopp/trunk/c5 cryptopp
b0467c5
#  tar -cjf cryptopp-5.6.1.svn479.tar.bz2 cryptopp
b0467c5
Source0:        cryptopp-5.6.1.svn479.tar.bz2
b0467c5
Source1:        cryptopp.pc
b0467c5
Patch0:         cryptopp-5.6.1-autotools.patch
b0467c5
Patch1:         cryptopp-5.6.1-s390.patch
0841eb1
BuildRequires:  doxygen, autoconf, libtool
0841eb1
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0841eb1
0841eb1
%description
b0467c5
Crypto++ Library is a free C++ class library of cryptographic schemes.
0841eb1
See http://www.cryptopp.com/ for a list of supported algorithms.
0841eb1
b0467c5
One purpose of Crypto++ is to act as a repository of public domain
b0467c5
(not copyrighted) source code. Although the library is copyrighted as a
b0467c5
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}
b0467c5
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
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
b0467c5
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
b0467c5
b0467c5
cp %{SOURCE1} .
b0467c5
b0467c5
%setup -q -n %{name}
0841eb1
rm -f GNUmakefile
0841eb1
%patch0 -p1
b0467c5
%patch1 -p1 -b .s390
0841eb1
autoreconf --verbose --force --install
0841eb1
perl -pi -e 's/\r$//g' License.txt Readme.txt
0841eb1
0841eb1
%build
0841eb1
%configure --disable-static
0841eb1
%ifnarch x86_64
0841eb1
# Does not build with PIC by default on x86, see
0841eb1
# http://groups.google.com/group/cryptopp-users/browse_thread/thread/d639907b0b1816b9
0841eb1
sed -i -e '1 i #define CRYPTOPP_DISABLE_SSE2' config.h
0841eb1
%endif
0841eb1
make %{?_smp_mflags}
0841eb1
doxygen
0841eb1
0841eb1
%install
0841eb1
rm -rf $RPM_BUILD_ROOT
b0467c5
b0467c5
install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/cryptopp.pc
0841eb1
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c "
0841eb1
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
0841eb1
0841eb1
%check
951470d
./cryptest v 2>&1 | tee cryptest.log
951470d
grep -qs '^FAILED' cryptest.log && exit 1 || :
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)
0841eb1
%{_libdir}/*.so.*
0841eb1
0841eb1
%files devel
0841eb1
%defattr(0644,root,root,0755)
0841eb1
%{_includedir}/cryptopp
0841eb1
%defattr(-,root,root,0755)
0841eb1
%{_libdir}/*.so
b0467c5
%{_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
0841eb1
0841eb1
0841eb1
%changelog
b0467c5
* Thu Nov 26 2009 Alexey Kurov <nucleo@fedoraproject.org> - 5.6.1-0.1.svn479
b0467c5
- svn r479. MARS placed in the public domain by Wei Dai
b0467c5
- Fixes rhbz#539227
b0467c5
b0467c5
* Fri Oct 30 2009 Rahul Sundaram <sundaram@fedoraproject.org> 5.6.0-5
b0467c5
- Fix source
b0467c5
b0467c5
* Wed Oct 28 2009 Rahul Sundaram <sundaram@fedoraproject.org> 5.6.0-4
b0467c5
- Add pkgconfig file. Fixes rhbz#512761
b0467c5
b0467c5
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.6.0-3
b0467c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
b0467c5
52cf884
* Tue Jun  9 2009 Dan Horak <dan[at]dannu.cz> 5.6.0-2
52cf884
- add support for s390/s390x
52cf884
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