summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-04-12 16:05:50 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-04-12 16:05:50 +0900
commit28737ae977f6809eb2a17d29d453d031f5468baf (patch)
tree962fd217510da78eb34f6e19c2b3f5c29b473119
parentae11f7847deda4b2ccb61499eed06ce8c0e3836d (diff)
downloadrust-async-net-accepted/tizen_rust.tar.gz
rust-async-net-accepted/tizen_rust.tar.bz2
rust-async-net-accepted/tizen_rust.zip
-rw-r--r--packaging/rust-async-net.manifest5
-rw-r--r--packaging/rust-async-net.spec76
2 files changed, 81 insertions, 0 deletions
diff --git a/packaging/rust-async-net.manifest b/packaging/rust-async-net.manifest
new file mode 100644
index 0000000..017d22d
--- /dev/null
+++ b/packaging/rust-async-net.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/rust-async-net.spec b/packaging/rust-async-net.spec
new file mode 100644
index 0000000..16c0c3e
--- /dev/null
+++ b/packaging/rust-async-net.spec
@@ -0,0 +1,76 @@
+# Generated by rust2rpm 23
+%global _rpm_strip_disable 1
+%global debug_package %{nil}
+
+%global crate async-net
+%global real_crate_name async_net
+%global rustc_edition 2018
+
+Name: rust-async-net
+Version: 1.7.0
+Release: 1
+Summary: Async networking primitives for TCP/UDP/Unix communication
+
+License: Apache-2.0 OR MIT
+URL: https://crates.io/crates/async-net
+Source: %{crate}-%{version}.tar.gz
+Source1: %{name}.manifest
+
+# ==========================================================
+# BuildRequires
+# specifies build-time dependencies for the package
+# ==========================================================
+BuildRequires: rust
+BuildRequires: rust-async-io
+BuildRequires: rust-autocfg
+BuildRequires: rust-blocking
+BuildRequires: rust-futures-lite
+
+Requires: rust-async-io
+Requires: rust-autocfg
+Requires: rust-blocking
+Requires: rust-futures-lite
+
+
+%description
+Async networking primitives for TCP/UDP/Unix communication.
+
+%prep
+%setup -q
+cp %{SOURCE1} .
+
+# ==========================================================
+# 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 async_io \
+ %rust_dylib_extern autocfg \
+ %rust_dylib_extern blocking \
+ %rust_dylib_extern futures_lite \
+ ./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