-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblake3.spec
75 lines (63 loc) · 1.9 KB
/
blake3.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# TODO:
# - switch to rust implementation by default?
# - package b3sum
#
Summary: Official implementation of BLAKE3 cryptographic hash function
Name: blake3
Version: 1.6.0
Release: 1
License: CCO or Apache v2.0
Group: Libraries
Source0: https://github.com/BLAKE3-team/BLAKE3/archive/%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 7747f0e38df7e86726d9a8efc480473a
URL: https://github.com/BLAKE3-team/BLAKE3
BuildRequires: cmake >= 3.9
BuildRequires: rpmbuild(macros) >= 2.007
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
BLAKE3 is a cryptographic hash function that is:
- Much faster than MD5, SHA-1, SHA-2, SHA-3, and BLAKE2.
- Secure, unlike MD5 and SHA-1. And secure against length extension,
unlike SHA-2.
- Highly parallelizable across any number of threads and SIMD lanes,
because it's a Merkle tree on the inside.
- Capable of verified streaming and incremental updates, again because
it's a Merkle tree.
- A PRF, MAC, KDF, and XOF, as well as a regular hash.
- One algorithm with no variants, which is fast on x86-64 and also on
smaller architectures.
%package devel
Summary: Header files for blake3 library
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Header files for blake3 library.
%prep
%setup -q -n BLAKE3-%{version}
%build
install -d c/build
cd c/build
%cmake .. \
%ifarch %arm_with_neon
-DBLAKE3_USE_NEON_INTRINSICS:BOOL=ON \
-DBLAKE3_CFLAGS_NEON=''
%endif
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} -C c/build install \
DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libblake3.so.0
%attr(755,root,root) %{_libdir}/libblake3.so.*.*.*
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libblake3.so
%{_includedir}/blake3.h
%{_pkgconfigdir}/libblake3.pc
%{_libdir}/cmake/blake3