Bump to rust-tap 1.0.1 accepted/tizen_rust tizen accepted/tizen/rust/20231016.022011
authorDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 22 Mar 2023 05:24:51 +0000 (14:24 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 22 Mar 2023 05:24:51 +0000 (14:24 +0900)
packaging/extern.patch [new file with mode: 0644]
packaging/rust-tap.manifest [new file with mode: 0644]
packaging/rust-tap.spec [new file with mode: 0644]

diff --git a/packaging/extern.patch b/packaging/extern.patch
new file mode 100644 (file)
index 0000000..6cbc607
--- /dev/null
@@ -0,0 +1,17 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index e6abc40..86f96de 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -128,10 +128,11 @@ implementation, and does nothing else.
+ [`tap`]: tap/index.html
+ !*/
+-#![no_std]
+ #![cfg_attr(debug_assertions, warn(missing_docs))]
+ #![cfg_attr(not(debug_assertions), deny(missing_docs))]
++extern crate std as core;
++
+ pub mod conv;
+ pub mod pipe;
+ pub mod tap;
diff --git a/packaging/rust-tap.manifest b/packaging/rust-tap.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-tap.spec b/packaging/rust-tap.spec
new file mode 100644 (file)
index 0000000..7d7c2fc
--- /dev/null
@@ -0,0 +1,65 @@
+# Generated by rust2rpm 23
+%global _rpm_strip_disable 1
+%global debug_package %{nil}
+
+%global crate tap
+%global real_crate_name tap
+%global rustc_edition 2015
+
+Name:           rust-tap
+Version:        1.0.1
+Release:        1
+Summary:        Generic extensions for tapping values in Rust
+
+License:        MIT
+URL:            https://crates.io/crates/tap
+Source:         %{crate}-%{version}.tar.gz
+Source1:        %{name}.manifest
+Source2:        extern.patch
+
+# ==========================================================
+# BuildRequires
+# specifies build-time dependencies for the package
+# ==========================================================
+BuildRequires:  rust
+
+
+
+%description
+Generic extensions for tapping values in Rust.
+
+%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.txt
+%{_rust_dylibdir}/lib%{real_crate_name}.so