90 lines
2.8 KiB
RPMSpec
90 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package ed25519-java
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: ed25519-java
|
|
Version: 0.3.0
|
|
Release: 0
|
|
Summary: Implementation of EdDSA (Ed25519) in Java
|
|
License: CC0-1.0
|
|
URL: https://github.com/str4d/ed25519-java
|
|
Source0: https://github.com/str4d/ed25519-java/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
Patch0: 0001-EdDSAEngine.initVerify-Handle-any-non-EdDSAPublicKey.patch
|
|
Patch1: 0002-Disable-test-that-relies-on-internal-sun-JDK-classes.patch
|
|
BuildRequires: fdupes
|
|
BuildRequires: java-devel >= 1.8
|
|
BuildRequires: maven-local
|
|
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
This is an implementation of EdDSA in Java. Structurally, it
|
|
is based on the ref10 implementation in SUPERCOP (see
|
|
http://ed25519.cr.yp.to/software.html).
|
|
|
|
There are two internal implementations:
|
|
|
|
* A port of the radix-2^51 operations in ref10
|
|
- fast and constant-time, but only useful for Ed25519.
|
|
* A generic version using BigIntegers for calculation
|
|
- a bit slower and not constant-time, but compatible
|
|
with any EdDSA parameter specification.
|
|
|
|
%package javadoc
|
|
Summary: Javadoc for %{name}
|
|
|
|
%description javadoc
|
|
This package contains javadoc for %{name}.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch -P 0 -p1
|
|
%patch -P 1 -p1
|
|
|
|
# Unwanted tasks
|
|
%pom_remove_plugin :maven-gpg-plugin
|
|
%pom_remove_plugin :maven-javadoc-plugin
|
|
%pom_remove_plugin :maven-source-plugin
|
|
# Unavailable plugin
|
|
%pom_remove_plugin :nexus-staging-maven-plugin
|
|
# Make dep on sun.security.x509 optional, inject an Import-Package directive
|
|
%pom_xpath_inject "pom:configuration/pom:instructions" \
|
|
"<Import-Package>sun.security.x509;resolution:=optional,*</Import-Package>"
|
|
|
|
%{mvn_file} net.i2p.crypto:eddsa %{name} eddsa
|
|
|
|
%build
|
|
%{mvn_build} -f -- \
|
|
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
|
|
-Dmaven.compiler.release=8 \
|
|
%endif
|
|
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
|
|
-Dsource=8
|
|
|
|
%install
|
|
%mvn_install
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
%files -f .mfiles
|
|
%doc README.md
|
|
%license LICENSE.txt
|
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
%license LICENSE.txt
|
|
|
|
%changelog
|