summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-06-09 13:58:43 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-06-09 13:58:43 +0900
commite0e9faf127b91a97ecd161aa20171e80b49c1f69 (patch)
treee1e8515082275241aabb68e18d51c72730f0114a
parent39ec8b5c392e4b2223f7c317a68b96c94687d6d6 (diff)
downloadrust-basic-toml-tizen.tar.gz
rust-basic-toml-tizen.tar.bz2
rust-basic-toml-tizen.zip
-rw-r--r--packaging/rust-basic-toml.spec15
1 files changed, 9 insertions, 6 deletions
diff --git a/packaging/rust-basic-toml.spec b/packaging/rust-basic-toml.spec
index 66c1302..edb345b 100644
--- a/packaging/rust-basic-toml.spec
+++ b/packaging/rust-basic-toml.spec
@@ -20,6 +20,7 @@ Source1: %{name}.manifest
# BuildRequires
# specifies build-time dependencies for the package
# ==========================================================
+BuildRequires: cargo
BuildRequires: rust
BuildRequires: rust-serde
@@ -46,9 +47,10 @@ cp %{SOURCE1} .
# crate-type : dylib, proc-macro, cdylib, bin, etc.
# ==========================================================
%build
-export CARGO_PKG_VERSION_MAJOR=1
-export CARGO_PKG_VERSION_MINOR=67
-export CARGO_PKG_VERSION_PATCH=1
+export CARGO_PKG_VERSION=$(cargo --version | cut -d ' ' -f 2)
+export CARGO_PKG_VERSION_MAJOR=$(echo $CARGO_PKG_VERSION | cut -d'.' -f 1 )
+export CARGO_PKG_VERSION_MINOR=$(echo $CARGO_PKG_VERSION | cut -d'.' -f 2 )
+export CARGO_PKG_VERSION_PATCH=$(echo $CARGO_PKG_VERSION | cut -d'.' -f 3 )
%{rustc_std_build} --crate-type=dylib \
--crate-name=%{real_crate_name} \
@@ -65,9 +67,10 @@ install -m 0644 lib%{real_crate_name}.so %{buildroot}/%{_rust_dylibdir}/lib%{rea
%check
%if 0%{?run_tests}
-export CARGO_PKG_VERSION_MAJOR=1
-export CARGO_PKG_VERSION_MINOR=67
-export CARGO_PKG_VERSION_PATCH=1
+export CARGO_PKG_VERSION=$(cargo --version | cut -d ' ' -f 2)
+export CARGO_PKG_VERSION_MAJOR=$(echo $CARGO_PKG_VERSION | cut -d'.' -f 1 )
+export CARGO_PKG_VERSION_MINOR=$(echo $CARGO_PKG_VERSION | cut -d'.' -f 2 )
+export CARGO_PKG_VERSION_PATCH=$(echo $CARGO_PKG_VERSION | cut -d'.' -f 3 )
export unit_test_list="datetime enum_external_deserialize float formatting invalid parser tokens valid"
for unit_test in ${unit_test_list}