Blob Blame History Raw
Name:		freetiger
Version:	5
Release:	2%{?dist}
Summary:	Free implementation of the tiger hash algorithm
%{?el5:Group:	System Environment/Libraries}

License:	BSD
URL:		http://klondike.es/%{name}
Source0:	http://klondike.es/%{name}/%{name}-v%{version}.tar.bz
Source1:	http://besser82.fedorapeople.org/%{name}/%{name}-v%{version}_cmake.tar.gz

# no need to submit, just make test-prog return 0.
Patch0:		freetiger_fix_testprog.patch

%{?el5:BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)}
BuildRequires:	cmake

%description
%{name} is an implementation of the tiger hash algorithm made looking
only at the tiger reference paper (thus ignoring the reference code until
a working implementation was made). It also includes a modified version
of the main program included with the tiger reference implementation which
was used for benchmarking purposes.

It has been optimized for usage in the TTH calculation algorithm and
includes optimized versions that will calculate the hashes for the
1024 byte file chunks and the 48 byte hash concatenation appending the
proper suffix automatically thus minimizing memory to memory copying.

Also %{name} features interleaved hashing where the hashes of two
different blocks are calculated at the same time interleaving the
operations of one and the other. Using this increases the
implementation performance.

%{name} also supports SSE2 for key scheduling during the tiger rounds
which also increases performance on processors supporting it and
provides an implementation of the partial hashing scheme for a more
secure password storage when authenticating clients using the GPA
command in ADC.

%package	devel
Summary:	Development files for %{name}
%{?el5:Group:	Development/Libraries}

Requires:	%{name}%{?_isa} = %{version}-%{release}

%description	devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q -b 1 -n tiger
%patch0


%build
mkdir -p build
pushd build
%cmake \
	-DCMAKE_SKIP_RPATH:BOOL=OFF \
	..
make %{?_smp_mflags}


%check
pushd build
make check


%install
pushd build
%{?el5:rm -rf %{buildroot}}
make install DESTDIR=%{buildroot}


%clean
%{?el5:rm -rf %{buildroot}}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%doc CHANGELOG DISCLAIMER LICENSE README THANKS
%{_libdir}/*.so.*

%files devel
%doc C/README C/tigermain.c C/TODO
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/cmake

%changelog
* Fri May 31 2013 Björn Esser <bjoern.esser@gmail.com> - 5-2
- devel shouldn't require cmake, owning %%{_libdir}/cmake is enough.

* Fri May 31 2013 Björn Esser <bjoern.esser@gmail.com> - 5-1
- Initial rpm release (#969387)