Bump to rust-pin-project 1.0.12
authorRoy7Kim <myoungwoon.kim@samsung.com>
Mon, 20 Mar 2023 04:46:43 +0000 (13:46 +0900)
committerRoy7Kim <myoungwoon.kim@samsung.com>
Mon, 20 Mar 2023 04:46:43 +0000 (13:46 +0900)
packaging/extern.patch [new file with mode: 0644]
packaging/rust-pin-project.manifest [new file with mode: 0644]
packaging/rust-pin-project.spec [new file with mode: 0644]

diff --git a/packaging/extern.patch b/packaging/extern.patch
new file mode 100644 (file)
index 0000000..a477fe8
--- /dev/null
@@ -0,0 +1,21 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index 5fa9298..6d1a9cd 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -66,6 +66,7 @@
+ //! [pin-projection]: core::pin#projections-and-structural-pinning
+ //! [struct-default-expanded]: https://github.com/taiki-e/pin-project/blob/HEAD/examples/struct-default-expanded.rs
++
+ #![no_std]
+ #![doc(test(
+     no_crate_inject,
+@@ -91,6 +92,8 @@
+ )]
+ #![allow(clippy::needless_doctest_main)]
++extern crate std;
++
+ #[doc(inline)]
+ pub use pin_project_internal::pin_project;
+ #[doc(inline)]
diff --git a/packaging/rust-pin-project.manifest b/packaging/rust-pin-project.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/rust-pin-project.spec b/packaging/rust-pin-project.spec
new file mode 100644 (file)
index 0000000..f83848d
--- /dev/null
@@ -0,0 +1,75 @@
+# Generated by rust2rpm 23
+%global _rpm_strip_disable 1
+%global debug_package %{nil}
+
+%global crate pin-project
+%global real_crate_name pin_project
+%global rustc_edition 2018
+
+Name:           rust-pin-project
+Version:        1.0.12
+Release:        1
+Summary:        Crate for safe and ergonomic pin-projection
+
+License:        Apache-2.0 OR MIT
+URL:            https://crates.io/crates/pin-project
+Source:         %{crate}-%{version}.tar.gz
+Source1:        %{name}.manifest
+Source2:        extern.patch
+
+# ==========================================================
+# BuildRequires
+# specifies build-time dependencies for the package
+# ==========================================================
+BuildRequires:  rust
+BuildRequires:  rust-pin-project-internal
+
+# ==========================================================
+# dev-dependencies
+# ==========================================================
+# BuildRequires:  rust-macrotest 
+# BuildRequires:  rust-rustversion 
+# BuildRequires:  rust-static_assertions 
+# BuildRequires:  rust-trybuild 
+
+
+%description
+Crate for safe and ergonomic pin-projection.
+
+%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}} \
+         %rust_dylib_extern pin_project_internal \
+         ./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