[packages/blake3] new

atler atler at pld-linux.org
Sun Sep 24 13:11:45 CEST 2023


commit 85a24f4d65a63a9914ca5a31bfd987f24867c8b0
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Sep 24 12:11:47 2023 +0200

    new
    
    - force neon on arm archs with neon since contrary to x86 simd
      intrinsics it lacks runtime detection (BLAKE3_CFLAGS_NEON needs to be
      defined to satisfy cmake logic, but are defined to empty value cause
      our cflags handle it already)

 blake3.spec | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)
---
diff --git a/blake3.spec b/blake3.spec
new file mode 100644
index 0000000..836d5fa
--- /dev/null
+++ b/blake3.spec
@@ -0,0 +1,75 @@
+# TODO:
+# - switch to rust implementation by  default?
+# - package b3sum
+#
+Summary:	Official implementation of BLAKE3 cryptographic hash function
+Name:		blake3
+Version:	1.5.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:	9a94bd3830d284b6bc4949c7bb00b171
+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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/blake3.git/commitdiff/85a24f4d65a63a9914ca5a31bfd987f24867c8b0



More information about the pld-cvs-commit mailing list