From 89c83574d6c361ab767a8f436f4fc76026b7a7c1 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Sat, 22 Jul 2023 19:01:30 -0700 Subject: [PATCH] Initial import; Fixes: RHBZ#2224755 --- .gitignore | 1 + 15.patch | 40 +++++++++++++++++++ rust-wmidi.spec | 85 +++++++++++++++++++++++++++++++++++++++++ sources | 1 + wmidi-fix-metadata.diff | 11 ++++++ 5 files changed, 138 insertions(+) create mode 100644 .gitignore create mode 100644 15.patch create mode 100644 rust-wmidi.spec create mode 100644 sources create mode 100644 wmidi-fix-metadata.diff diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a994170 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/wmidi-4.0.6.crate diff --git a/15.patch b/15.patch new file mode 100644 index 0000000..fe19e66 --- /dev/null +++ b/15.patch @@ -0,0 +1,40 @@ +From e8e4a13990e14d6f0cf52e122bdf4e2edfdf951c Mon Sep 17 00:00:00 2001 +From: Davide Cavalca +Date: Sat, 22 Jul 2023 09:16:32 -0700 +Subject: [PATCH] Add license text + +--- + LICENSE | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + create mode 100644 LICENSE + +diff --git a/LICENSE b/LICENSE +new file mode 100644 +index 0000000..468cd79 +--- /dev/null ++++ b/LICENSE +@@ -0,0 +1,23 @@ ++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. +\ No newline at end of file diff --git a/rust-wmidi.spec b/rust-wmidi.spec new file mode 100644 index 0000000..665d332 --- /dev/null +++ b/rust-wmidi.spec @@ -0,0 +1,85 @@ +# Generated by rust2rpm 24 +%bcond_without check +%global debug_package %{nil} + +%global crate wmidi + +Name: rust-wmidi +Version: 4.0.6 +Release: %autorelease +Summary: Midi parsing library + +License: MIT +URL: https://crates.io/crates/wmidi +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * drop criterion dependency +Patch: wmidi-fix-metadata.diff +# Add license text +Patch: https://github.com/RustAudio/wmidi/pull/15.patch + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Midi parsing library.} + +%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 + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-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 diff --git a/sources b/sources new file mode 100644 index 0000000..58e6b62 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (wmidi-4.0.6.crate) = 3a1cd02495c7358bb2c8eb4598bc519a2b3f496a2eb7b6d8a6a676beb1fac724b38cdb4b7cd68926c9fb5bf0d73c3cdfd8051ce02893834e556624394ae8dfae diff --git a/wmidi-fix-metadata.diff b/wmidi-fix-metadata.diff new file mode 100644 index 0000000..95f4ff1 --- /dev/null +++ b/wmidi-fix-metadata.diff @@ -0,0 +1,11 @@ +--- wmidi-4.0.6/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ wmidi-4.0.6/Cargo.toml 2023-07-22T16:20:04.331461+00:00 +@@ -29,8 +29,6 @@ + harness = false + + [dependencies] +-[dev-dependencies.criterion] +-version = "0.3" + + [features] + default = ["std"]