initial import (#1948145)

epel9
Fabio Valentini 4 years ago
parent df3167af72
commit 481f3814f9
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

4
.gitignore vendored

@ -0,0 +1,4 @@
/results_*/
/*.src.rpm
/nettle-sys-2.0.6.crate

@ -0,0 +1,25 @@
From 6510e5e27937114508925efcf22c5b6fadb2631e Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Wed, 7 Apr 2021 12:16:03 +0200
Subject: [PATCH] build: drop unavailable ECC functions
---
build.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/build.rs b/build.rs
index 24e2d42..eee9eb1 100644
--- a/build.rs
+++ b/build.rs
@@ -92,6 +92,8 @@ fn real_main() -> Result<()> {
.blacklist_function("qgcvt")
.blacklist_function("qecvt_r")
.blacklist_function("qfcvt_r")
+ .blacklist_function("nettle_get_secp_192r1")
+ .blacklist_function("nettle_get_secp_224r1")
.size_t_is_usize(true);
for p in include_paths {
--
2.30.2

@ -1,3 +0,0 @@
# rust-nettle-sys
The rust-nettle-sys package

@ -0,0 +1,17 @@
--- nettle-sys-2.0.6/Cargo.toml 2021-03-08T12:53:23+00:00
+++ nettle-sys-2.0.6/Cargo.toml 2021-03-31T10:08:35.544103+00:00
@@ -30,14 +30,5 @@
version = ">= 0.53.1, < 0.58.0"
default-features = false
-[build-dependencies.nettle-src]
-version = "3.5.1-0"
-optional = true
-
[build-dependencies.pkg-config]
version = "0.3"
-
-[features]
-vendored = ["nettle-src"]
-[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg]
-version = "0.2.9"

@ -0,0 +1,84 @@
# Generated by rust2rpm 16
%bcond_without check
%global debug_package %{nil}
%global crate nettle-sys
Name: rust-%{crate}
Version: 2.0.6
Release: 1%{?dist}
Summary: Low-level Rust bindings for the Nettle cryptographic library
# Upstream license specification: LGPL-3.0/GPL-2.0/GPL-3.0
License: LGPLv3 or GPLv2 or GPLv3
URL: https://crates.io/crates/nettle-sys
Source: %{crates_source}
# Initial patched metadata
# * drop feature for using vendored nettle
Patch0: nettle-sys-fix-metadata.diff
# * drop two elliptic curves that are disabled in nettle in Fedora:
# - nettle_get_secp_192r1
# - nettle_get_secp_224r1
Patch1: 0001-build-drop-unavailable-ECC-functions.patch
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand:
Low-level Rust bindings for the Nettle cryptographic library.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
Requires: pkgconfig(nettle)
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%license LICENSE-GPL2 LICENSE-GPL3 LICENSE-LGPL3
%doc README.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%package -n %{name}+default-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages
which use "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
echo 'pkgconfig(nettle)'
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Thu Apr 08 2021 Fabio Valentini <decathorpe@gmail.com> - 2.0.6-1
- Initial package

@ -0,0 +1 @@
SHA512 (nettle-sys-2.0.6.crate) = 6865d4d9a57bbad1701c21b1acc419ea52f0f2ef5cb4596a783e2a5e6e2206a233d87e5f6d79c8ee4afce826c639860a203066a6edeca959f94f8dfb46abcd9f
Loading…
Cancel
Save