diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c244814 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/libb2-60ea749837362c226e8501718f505ab138e5c19d.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 1156e24..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# libb2 - -The libb2 package \ No newline at end of file diff --git a/libb2.spec b/libb2.spec new file mode 100644 index 0000000..97c012c --- /dev/null +++ b/libb2.spec @@ -0,0 +1,66 @@ +%global commit 60ea749837362c226e8501718f505ab138e5c19d +%global date 20171225 + +%global with_check 1 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: libb2 +Summary: C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp +Version: 0.98 +Release: 1.%{date}git%{shortcommit}%{?dist} +License: CC0 +URL: https://blake2.net/ +Source0: https://github.com/BLAKE2/libb2/archive/%{commit}/libb2-%{commit}.tar.gz + +BuildRequires: gcc +BuildRequires: automake +BuildRequires: libtool + +%description +C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp. + +BLAKE2 is a cryptographic hash function faster than MD5, SHA-1, SHA-2, +and SHA-3, yet is at least as secure as the latest standard SHA-3. + +%package devel +Summary: Development files for the Blake2 library +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +%{summary}. + +%prep +%autosetup -n libb2-%{commit} + +# Force default Fedora cflags +sed -e 's|CFLAGS=-O3|CFLAGS="%{optflags}"|g' -i configure.ac +autoreconf -ivf + +%build +# Default Fedora cflags prevents SSE checking +unset $CFLAGS +%configure --disable-silent-rules --enable-static=no --enable-native=no +%make_build LDFLAGS="%{__global_ldflags}" + +%if 0%{with_check} +%check +make check +%endif + +%install +%make_install +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la + +%ldconfig_scriptlets + +%files +%license LICENSE +%{_libdir}/libb2.so.* + +%files devel +%{_libdir}/libb2.so +%{_includedir}/blake2.h + +%changelog +* Sun Mar 18 2018 Antonio Trande - 0.98-1.20171225git60ea749 +- First RPM diff --git a/sources b/sources new file mode 100644 index 0000000..f1e7b60 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (libb2-60ea749837362c226e8501718f505ab138e5c19d.tar.gz) = c32cb76e54124936631344a5303f243a53441cdf07d5876ecd3e1a7e006f05ae8a95121d1ba1e579eff686763cfa9d033f6f93225a283dfe58a5c03c41976eb1