Blob Blame Raw
Name:           cryptopp
Version:        5.6.1
Release:        0.1.svn479%{?dist}
Summary:        Public domain C++ class library of cryptographic schemes
License:        Public Domain
Group:          System Environment/Libraries
URL:            http://www.cryptopp.com/
#Source0:        http://www.cryptopp.com/cryptopp560.zip

# The source for this package was pulled from upstream's vcs.
# Use the following commands to generate the tarball:
#  svn export -r 479 https://cryptopp.svn.sourceforge.net/svnroot/cryptopp/trunk/c5 cryptopp
#  tar -cjf cryptopp-5.6.1.svn479.tar.bz2 cryptopp
Source0:        cryptopp-5.6.1.svn479.tar.bz2
Source1:        cryptopp.pc
Patch0:         cryptopp-5.6.1-autotools.patch
Patch1:         cryptopp-5.6.1-s390.patch
BuildRequires:  doxygen, autoconf, libtool
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
Crypto++ Library is a free C++ class library of cryptographic schemes.
See http://www.cryptopp.com/ for a list of supported algorithms.

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 are in the public domain.


%package devel
Summary:        Header files and development documentation for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig
%description devel
Crypto++ Library is a free C++ class library of cryptographic schemes.

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

%package doc
Summary:        Documentation for %{name}
Group:          Documentation

%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/Tools
Requires:       %{name} = %{version}-%{release}

%description progs
Crypto++ Library is a free C++ class library of cryptographic schemes.

This package contains programs for manipulating %{name} routines.

%prep

cp %{SOURCE1} .

%setup -q -n %{name}
rm -f GNUmakefile
%patch0 -p1
%patch1 -p1 -b .s390
autoreconf --verbose --force --install
perl -pi -e 's/\r$//g' License.txt Readme.txt

%build
%configure --disable-static
%ifnarch x86_64
# Does not build with PIC by default on x86, see
# http://groups.google.com/group/cryptopp-users/browse_thread/thread/d639907b0b1816b9
sed -i -e '1 i #define CRYPTOPP_DISABLE_SSE2' config.h
%endif
make %{?_smp_mflags}
doxygen

%install
rm -rf $RPM_BUILD_ROOT

install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/cryptopp.pc
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c "
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'

%check
./cryptest v 2>&1 | tee cryptest.log
grep -qs '^FAILED' cryptest.log && exit 1 || :

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(0644,root,root,0755)
%doc License.txt Readme.txt
%defattr(-,root,root,0755)
%{_libdir}/*.so.*

%files devel
%defattr(0644,root,root,0755)
%{_includedir}/cryptopp
%defattr(-,root,root,0755)
%{_libdir}/*.so
%{_libdir}/pkgconfig/cryptopp.pc

%files doc
%defattr(0644,root,root,0755)
%doc doc/html/*

%files progs
%defattr(0644,root,root,0755)
%attr(0755,root,root) %{_bindir}/cryptest


%changelog
* Thu Nov 26 2009 Alexey Kurov <nucleo@fedoraproject.org> - 5.6.1-0.1.svn479
- svn r479. MARS placed in the public domain by Wei Dai
- Fixes rhbz#539227

* Fri Oct 30 2009 Rahul Sundaram <sundaram@fedoraproject.org> 5.6.0-5
- Fix source

* Wed Oct 28 2009 Rahul Sundaram <sundaram@fedoraproject.org> 5.6.0-4
- Add pkgconfig file. Fixes rhbz#512761

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Jun  9 2009 Dan Horak <dan[at]dannu.cz> 5.6.0-2
- add support for s390/s390x

* Sun Mar 15 2009 Aurelien Bompard <abompard@fedoraproject.org> 5.6.0-1
- version 5.6.0
- rediff patches

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Sep 30 2008 Aurelien Bompard <abompard@fedoraproject.org> 5.5.2-3
- purge source archive from patented code
- use SSE2 on x86_64
- preserve timestamps on install

* Mon Sep 22 2008 Aurelien Bompard <abompard@fedoraproject.org> 5.5.2-2
- rediff gcc 4.3 patch

* Wed Aug 27 2008 Aurelien Bompard <abompard@fedoraproject.org> 5.5.2-1
- adapt to fedora, from Mandriva