Package sha1collisiondetection: Specfile

# SPDX-License-Identifier: GPL-2.0-only
%define _unpackaged_files_terminate_build 1
%define _stripped_files_terminate_build 1
%set_verify_elf_method strict

Name: sha1collisiondetection
Version: 1.0.3
Release: alt1
Summary: Command line tool to detect SHA-1 collision in a file
Group: Other
License: MIT
Source: %name-%version.tar
Requires: libsha1detectcoll1 = %EVR

This library and command line tool were designed as near drop-in
replacements for common SHA-1 libraries and sha1sum. They will compute the
SHA-1 hash of any given file and additionally will detect cryptanalytic
collision attacks against SHA-1 present in each file. It is very fast
and takes less than twice the amount of time as regular SHA-1.

%package -n libsha1detectcoll1
Summary: Library to detect SHA-1 collision in a file
Group: System/Libraries

%description -n libsha1detectcoll1

%package -n libsha1detectcoll-devel
Summary: Depelopment files to detect SHA-1 collision in a file
Group: Development/C
Requires: libsha1detectcoll1 = %EVR

%description -n libsha1detectcoll-devel


%add_optflags %(getconf LFS_CFLAGS)
%make_build TARGETCFLAGS="%optflags" PREFIX=%_prefix LIBDIR=%_libdir

%make_install PREFIX=%buildroot%_prefix LIBDIR=%buildroot%_libdir install
find %buildroot -name '*.a' -delete
rmdir %buildroot%_includedir/sha1dc/{%_lib,bin}

make test


%files -n libsha1detectcoll1

%files -n libsha1detectcoll-devel
%doc LICENSE.txt

* Tue Aug 31 2021 Vitaly Chikunov <> 1.0.3-alt1
- First import of stable-v1.0.3-37-gb4a7b0b (2020-12-09).