Bump to rust-nix 0.26.2
authorRoy7Kim <myoungwoon.kim@samsung.com>
Tue, 21 Mar 2023 07:20:53 +0000 (16:20 +0900)
committerRoy7Kim <myoungwoon.kim@samsung.com>
Tue, 21 Mar 2023 07:20:53 +0000 (16:20 +0900)
packaging/rust-nix.manifest [new file with mode: 0644]
packaging/rust-nix.spec [new file with mode: 0644]

diff --git a/packaging/rust-nix.manifest b/packaging/rust-nix.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-nix.spec b/packaging/rust-nix.spec
new file mode 100644 (file)
index 0000000..1e71125
--- /dev/null
@@ -0,0 +1,118 @@
+# Generated by rust2rpm 23
+%global _rpm_strip_disable 1
+%global debug_package %{nil}
+
+%global crate nix
+%global real_crate_name nix
+%global rustc_edition 2018
+
+Name:           rust-nix
+Version:        0.26.2
+Release:        1
+Summary:        Rust friendly bindings to *nix APIs
+
+License:        MIT
+URL:            https://crates.io/crates/nix
+Source:         %{crate}-%{version}.tar.gz
+Source1:        %{name}.manifest
+
+# ==========================================================
+# BuildRequires
+# specifies build-time dependencies for the package
+# ==========================================================
+BuildRequires:  rust
+BuildRequires:  rust-bitflags
+BuildRequires:  rust-cfg-if
+BuildRequires:  rust-libc
+BuildRequires:  rust-memoffset
+BuildRequires:  rust-pin-utils
+BuildRequires:  rust-static_assertions
+
+# ==========================================================
+# dev-dependencies
+# ==========================================================
+# BuildRequires:  rust-assert-impl 
+# BuildRequires:  rust-caps 
+# BuildRequires:  rust-lazy_static 
+# BuildRequires:  rust-parking_lot 
+# BuildRequires:  rust-rand 
+# BuildRequires:  rust-semver 
+# BuildRequires:  rust-tempfile 
+
+
+%description
+Rust friendly bindings to *nix APIs.
+
+%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}} \
+         --cfg='feature="acct"' \
+         --cfg='feature="aio"' \
+         --cfg='feature="dir"' \
+         --cfg='feature="env"' \
+         --cfg='feature="event"' \
+         --cfg='feature="feature"' \
+         --cfg='feature="fs"' \
+         --cfg='feature="hostname"' \
+         --cfg='feature="inotify"' \
+         --cfg='feature="ioctl"' \
+         --cfg='feature="kmod"' \
+         --cfg='feature="mman"' \
+         --cfg='feature="mount"' \
+         --cfg='feature="mqueue"' \
+         --cfg='feature="net"' \
+         --cfg='feature="personality"' \
+         --cfg='feature="poll"' \
+         --cfg='feature="process"' \
+         --cfg='feature="pthread"' \
+         --cfg='feature="ptrace"' \
+         --cfg='feature="quota"' \
+         --cfg='feature="reboot"' \
+         --cfg='feature="resource"' \
+         --cfg='feature="sched"' \
+         --cfg='feature="signal"' \
+         --cfg='feature="socket"' \
+         --cfg='feature="term"' \
+         --cfg='feature="time"' \
+         --cfg='feature="ucontext"' \
+         --cfg='feature="uio"' \
+         --cfg='feature="user"' \
+         --cfg='feature="zerocopy"' \
+         %rust_dylib_extern libc \
+         %rust_dylib_extern libz_sys \
+         %rust_dylib_extern cfg_if \
+         %rust_dylib_extern bitflags \
+         %rust_dylib_extern memoffset \
+         %rust_dylib_extern pin_utils \
+         %rust_dylib_extern static_assertions \
+         ./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
+ %{_rust_dylibdir}/lib%{real_crate_name}.so