diff options
-rw-r--r-- | packaging/rust-bytecheck.manifest | 5 | ||||
-rw-r--r-- | packaging/rust-bytecheck.spec | 77 |
2 files changed, 82 insertions, 0 deletions
diff --git a/packaging/rust-bytecheck.manifest b/packaging/rust-bytecheck.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-bytecheck.manifest @@ -0,0 +1,5 @@ +<manifest> + <request> + <domain name="_"/> + </request> +</manifest> diff --git a/packaging/rust-bytecheck.spec b/packaging/rust-bytecheck.spec new file mode 100644 index 0000000..22c550f --- /dev/null +++ b/packaging/rust-bytecheck.spec @@ -0,0 +1,77 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate bytecheck +%global real_crate_name bytecheck +%global rustc_edition 2021 + +Name: rust-bytecheck +Version: 0.7.0 +Release: 1 +Summary: Derive macro for bytecheck + +License: MIT +URL: https://crates.io/crates/bytecheck +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust +BuildRequires: rust-bytecheck_derive +BuildRequires: rust-ptr_meta +BuildRequires: rust-simdutf8 +BuildRequires: rust-uuid + +Requires: rust-bytecheck_derive +Requires: rust-ptr_meta +Requires: rust-simdutf8 +Requires: rust-uuid + + +%description +Derive macro for bytecheck. + +%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="std"' \ + --cfg='feature="simdutf8"' \ + %rust_dylib_extern bytecheck_derive \ + %rust_dylib_extern ptr_meta \ + %rust_dylib_extern simdutf8 \ + %rust_dylib_extern uuid \ + ./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 |