diff options
author | 김명운/Tizen Platform Lab(SR)/삼성전자 <myoungwoon.kim@samsung.com> | 2023-05-10 13:47:55 +0900 |
---|---|---|
committer | GitHub Enterprise <noreply-CODE@samsung.com> | 2023-05-10 13:47:55 +0900 |
commit | bfef8951f2a73850804890601e5ff8144ee83ce9 (patch) | |
tree | 0212ac7ba8b0cc3532872b9c68dd96301091931c | |
parent | 650a5ccb2fb3e1294ef0a51c86a1aae9a6cca8b0 (diff) | |
parent | f4a3bf201bd886ac54426affdbeeae7dca99cabb (diff) | |
download | rust-assert_matches-bfef8951f2a73850804890601e5ff8144ee83ce9.tar.gz rust-assert_matches-bfef8951f2a73850804890601e5ff8144ee83ce9.tar.bz2 rust-assert_matches-bfef8951f2a73850804890601e5ff8144ee83ce9.zip |
Merge pull request #1 from myoungwoon-kim/dev
Bump to rust-assert_matches 1.5.0
-rw-r--r-- | packaging/extern.patch | 13 | ||||
-rw-r--r-- | packaging/rust-assert_matches.manifest | 5 | ||||
-rw-r--r-- | packaging/rust-assert_matches.spec | 67 |
3 files changed, 85 insertions, 0 deletions
diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..572e865 --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 5a61329..e2d5b3b 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -14,6 +14,8 @@ + #![deny(missing_docs)] + #![cfg_attr(not(test), no_std)] + ++extern crate std; ++ + /// Asserts that an expression matches a given pattern. + /// + /// A guard expression may be supplied to add further restrictions to the diff --git a/packaging/rust-assert_matches.manifest b/packaging/rust-assert_matches.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-assert_matches.manifest @@ -0,0 +1,5 @@ +<manifest> + <request> + <domain name="_"/> + </request> +</manifest> diff --git a/packaging/rust-assert_matches.spec b/packaging/rust-assert_matches.spec new file mode 100644 index 0000000..3427430 --- /dev/null +++ b/packaging/rust-assert_matches.spec @@ -0,0 +1,67 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate assert_matches +%global real_crate_name assert_matches +%global rustc_edition 2015 + +Name: rust-assert_matches +Version: 1.5.0 +Release: 1 +Summary: Asserts that a value matches a pattern + +# Upstream license specification: MIT/Apache-2.0 +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/assert_matches +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust + + + +%description +Asserts that a value matches a pattern. + +%prep +%setup -q +cp %{SOURCE1} . +%{__patch} -p1 < %{SOURCE2} + +# ========================================================== +# build section +# crate-type : dylib, proc-macro, cdylib, bin, etc. +# ========================================================== +%build +%{rustc_std_build} --crate-type=dylib \ + --crate-name=%{real_crate_name} \ + %{?rustc_edition:--edition=%{rustc_edition}} \ + ./src/lib.rs + +# ========================================================== +# install section +# ========================================================== +%install +install -d -m 0755 %{buildroot}%{_rust_dylibdir} +install -m 0644 lib%{real_crate_name}.so %{buildroot}/%{_rust_dylibdir}/lib%{real_crate_name}.so + +%clean + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +# ========================================================== +# files section +# ========================================================== +%files +%manifest %{name}.manifest +%license LICENSE-APACHE +%license LICENSE-MIT +%{_rust_dylibdir}/lib%{real_crate_name}.so |