Initial Fedora package

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
epel9 imports/e9/rust-powierza-coefficient-1.0.2-1.el9
Michel Alexandre Salim 2 years ago
parent 54337981a6
commit 38dc41b8cb
No known key found for this signature in database
GPG Key ID: 8B229D2F7CCC04F2

1
.gitignore vendored

@ -0,0 +1 @@
/powierza-coefficient-1.0.2.crate

@ -0,0 +1,57 @@
From 5e851fbe118c9f26bbba0149df6080aaab706c54 Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <salimma@fedoraproject.org>
Date: Tue, 30 May 2023 21:26:54 -0500
Subject: [PATCH] Add license text
This is needed as the MIT license requires the copyright notice and
permission notice to be included.
See
https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT#Modern_Style_with_sublicense
for source
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
---
Cargo.toml | 1 +
LICENSE | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
create mode 100644 LICENSE
diff --git a/Cargo.toml b/Cargo.toml
index cb0362c..cedcacd 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -4,6 +4,7 @@ authors = ["micouy"]
version = "1.0.2"
edition = "2018"
include = [
+ "LICENSE",
"README.md",
"Cargo.toml",
"**/**.rs",
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..3160b34
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2021-present Mikołaj Powierża and others
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -0,0 +1,19 @@
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,6 +15,7 @@ name = "powierza-coefficient"
version = "1.0.2"
authors = ["micouy"]
include = [
+ "LICENSE",
"README.md",
"Cargo.toml",
"**/**.rs",
@@ -38,8 +39,5 @@ harness = false
[dependencies]
-[dev-dependencies.criterion]
-version = "0.3"
-
[dev-dependencies.strsim]
version = "0.10"

@ -0,0 +1,75 @@
# Generated by rust2rpm 24
%bcond_without check
%global debug_package %{nil}
%global crate powierza-coefficient
Name: rust-powierza-coefficient
Version: 1.0.2
Release: %autorelease
Summary: Powierza coefficient for gauging string abbreviations
License: MIT
URL: https://crates.io/crates/powierza-coefficient
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# * remove unused criterion dependency
# * ship license text
Patch: powierza-coefficient-fix-metadata.diff
# Add license text
Patch: https://github.com/micouy/powierza-coefficient/pull/1.patch#/powierza-coefficient-add-license.diff
BuildRequires: rust-packaging >= 21
%global _description %{expand:
Powierża coefficient is a statistic for gauging if one string is an
abbreviation of another.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%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 the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog

@ -0,0 +1 @@
SHA512 (powierza-coefficient-1.0.2.crate) = a1924ec6f83e6c1fcbeebfaba9116d91d16f6677d11259be4a92d894bc4a485bdb8dfa9b6be8b6f89818f04839948c47210959936b646c76b881ada1b1540d16
Loading…
Cancel
Save