Bump to rust-avif-parse 1.0.0 accepted/tizen_rust tizen accepted/tizen/rust/20231016.020832
authorDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 19 Apr 2023 05:43:24 +0000 (14:43 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 19 Apr 2023 05:48:43 +0000 (14:48 +0900)
[   41s] + ./avif_parse
[   41s]
[   41s] running 2 tests
[   41s] test tests::read_to_end_ ... ok
[   41s] test tests::read_to_end_oom ... ok
[   41s]
[   41s] test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

packaging/rust-avif-parse.manifest [new file with mode: 0644]
packaging/rust-avif-parse.spec [new file with mode: 0644]

diff --git a/packaging/rust-avif-parse.manifest b/packaging/rust-avif-parse.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-avif-parse.spec b/packaging/rust-avif-parse.spec
new file mode 100644 (file)
index 0000000..c879965
--- /dev/null
@@ -0,0 +1,97 @@
+# Generated by rust2rpm 23
+%global _rpm_strip_disable 1
+%global debug_package %{nil}
+
+%global crate avif-parse
+%global real_crate_name avif_parse
+%global rustc_edition 2021
+
+Name:           rust-avif-parse
+Version:        1.0.0
+Release:        1
+Summary:        Parser for AVIF image files
+
+License:        MPL-2.0
+URL:            https://crates.io/crates/avif-parse
+Source:         %{crate}-%{version}.tar.gz
+Source1:        %{name}.manifest
+
+# ==========================================================
+# BuildRequires
+# specifies build-time dependencies for the package
+# ==========================================================
+BuildRequires:  rust
+BuildRequires:  rust-bitreader
+BuildRequires:  rust-byteorder
+BuildRequires:  rust-fallible_collections
+BuildRequires:  rust-log
+BuildRequires:  rust-static_assertions
+
+Requires:       rust-bitreader
+Requires:       rust-byteorder
+Requires:       rust-fallible_collections
+Requires:       rust-static_assertions
+
+
+# ==========================================================
+# dev-dependencies
+# ==========================================================
+# BuildRequires:  rust-env_logger 
+# BuildRequires:  rust-walkdir 
+
+
+%description
+Parser for AVIF image files.
+
+%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 bitreader \
+        %rust_dylib_extern byteorder \
+        %rust_dylib_extern fallible_collections \
+        %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
+
+%check
+%if 0%{?run_tests}
+%{rustc_std_build} --test --crate-type=dylib \
+        --crate-name=%{real_crate_name} \
+        %{?rustc_edition:--edition=%{rustc_edition}} \
+        %rust_dylib_extern bitreader \
+        %rust_dylib_extern byteorder \
+        %rust_dylib_extern fallible_collections \
+        %rust_dylib_extern static_assertions \
+        ./src/lib.rs
+
+./%{real_crate_name}
+%endif
+
+%clean
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+# ==========================================================
+# files section
+# ==========================================================
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%{_rust_dylibdir}/lib%{real_crate_name}.so