summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-03-27 14:50:59 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-03-27 14:50:59 +0900
commit4f732130edae313fc0059ab5965538d26f86eaa6 (patch)
tree2ddb9dc71c067ced6f0ee801535790cb1bd89cdd
parent5376e013709b1a9acac6d3d0ea2dba23cccc1998 (diff)
downloadrust-terminal_size-accepted/tizen_rust.tar.gz
rust-terminal_size-accepted/tizen_rust.tar.bz2
rust-terminal_size-accepted/tizen_rust.zip
-rw-r--r--packaging/rust-terminal_size.manifest5
-rw-r--r--packaging/rust-terminal_size.spec66
2 files changed, 71 insertions, 0 deletions
diff --git a/packaging/rust-terminal_size.manifest b/packaging/rust-terminal_size.manifest
new file mode 100644
index 0000000..017d22d
--- /dev/null
+++ b/packaging/rust-terminal_size.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/rust-terminal_size.spec b/packaging/rust-terminal_size.spec
new file mode 100644
index 0000000..a5c9ca2
--- /dev/null
+++ b/packaging/rust-terminal_size.spec
@@ -0,0 +1,66 @@
+# Generated by rust2rpm 23
+%global _rpm_strip_disable 1
+%global debug_package %{nil}
+
+%global crate terminal_size
+%global real_crate_name terminal_size
+%global rustc_edition 2018
+
+Name: rust-terminal_size
+Version: 0.2.5
+Release: 1
+Summary: Gets the size of your Linux or Windows terminal
+
+License: MIT OR Apache-2.0
+URL: https://crates.io/crates/terminal_size
+Source: %{crate}-%{version}.tar.gz
+Source1: %{name}.manifest
+
+# ==========================================================
+# BuildRequires
+# specifies build-time dependencies for the package
+# ==========================================================
+BuildRequires: rust
+BuildRequires: rust-rustix
+
+Requires: rust-rustix
+
+%description
+Gets the size of your Linux or Windows terminal.
+
+%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 rustix \
+ ./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