raven-rhel6/libdecaf/libdecaf.spec
2024-02-21 20:14:44 +06:00

84 lines
2.1 KiB
RPMSpec

%define pname ed448goldilocks
%define commit da2f2f9b2ab1bce9a2bb77e4f37037ee135fdd72
%define shortcommit %(c=%{commit}; echo ${c:0:8})
%define sname decaf
%define major 0
Summary: An implementation of elliptic curve cryptograph
Name: lib%{sname}
Version: 1.0.2
Release: 1%{dist}
License: MIT
Group: System/Libraries
URL: https://ed448goldilocks.sourceforge.io/
#Source0: https://downloads.sourceforge.net/ed448goldilocks/%{name}-%{version}.tgz
Source0: https://sourceforge.net/code-snapshots/git/e/ed/ed448goldilocks/code.git/%{pname}-code-%{commit}.zip
BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: python38
BuildRequires: devtoolset-8-gcc-c++ devtoolset-8-build
Patch1: fix-cmake-install-paths.patch
Patch2: fix-declarations.patch
Patch3: fix-attribute-deprecated-decl.patch
%description
The libdecaf library is for elliptic curve research and practical application.
It currently supports Ed448-Goldilocks and Curve25519.
The goals of this library are:
- Implementing the X25519, X448 key exchange protocols (RFC 7748).
- Implementing the Ed25519 and EdDSA-Ed448 signature schemes (RFC 8032).
- Providing a platform for research and development of advanced cryptographic
schemes using twisted Edwards curves.
This library is intended for developers who have experience with
cryptography. It doesn't (yet?) include documentation on how to use
digital signatures or key exchange securely. Consult your local
cryptographer for advice.
%package devel
Summary: Development files for %{name}
Group: Development/C
Requires: %{name} = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}
%description devel
This package contains development files for %{name}.
%prep
%autosetup -p1 -n %{pname}-code-%{commit}
%build
%enable_devtoolset8
%cmake \
-DENABLE_SHARED:BOOL=ON \
-DENABLE_STATIC:BOOL=OFF \
-DENABLE_TESTS:BOOL=ON \
-DENABLE_STRICT:BOOL=OFF \
-DPYTHON_EXECUTABLE=%{_bindir}/python3.8 \
-G Ninja
%cmake_build
%install
%cmake_install
%files
%{_libdir}/*.so.%{major}*
%files devel
%{_libdir}/*.so
%{_includedir}/%{sname}
%{_libdir}/cmake/%{sname}
%changelog
* Wed Sep 15 2023 Raven <raven@sysadmins.ws> - 1.0.2-1
- initial build