summaryrefslogtreecommitdiff
path: root/packaging/rust-siphasher.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/rust-siphasher.spec')
-rw-r--r--packaging/rust-siphasher.spec75
1 files changed, 75 insertions, 0 deletions
diff --git a/packaging/rust-siphasher.spec b/packaging/rust-siphasher.spec
new file mode 100644
index 0000000..a63ab58
--- /dev/null
+++ b/packaging/rust-siphasher.spec
@@ -0,0 +1,75 @@
+# Generated by rust2rpm 23
+%global _rpm_strip_disable 1
+%global debug_package %{nil}
+
+%global crate siphasher
+%global real_crate_name siphasher
+%global rustc_edition 2018
+
+Name: rust-siphasher
+Version: 0.3.10
+Release: 1
+Summary: SipHash-2-4, SipHash-1-3 and 128-bit variants in pure Rust
+
+# Upstream license specification: MIT/Apache-2.0
+License: MIT OR Apache-2.0
+URL: https://crates.io/crates/siphasher
+Source: %{crate}-%{version}.tar.gz
+Source1: %{name}.manifest
+Source2: LICENSE-APACHE
+Source3: LICENSE-MIT
+
+# ==========================================================
+# BuildRequires
+# specifies build-time dependencies for the package
+# ==========================================================
+BuildRequires: rust
+BuildRequires: rust-serde
+
+# ==========================================================
+# dev-dependencies
+# ==========================================================
+# BuildRequires: rust-serde_json
+
+
+%description
+SipHash-2-4, SipHash-1-3 and 128-bit variants in pure Rust.
+
+%prep
+%setup -q
+cp %{SOURCE1} .
+cp %{SOURCE2} .
+cp %{SOURCE3} .
+
+# ==========================================================
+# 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"' \
+ ./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