From 83f9b1f82b351328e3d730c2f94317882b46de22 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sun, 18 Jul 2021 21:43:04 +0200 Subject: [PATCH] Initial package (closes: RHBZ#1983468) Signed-off-by: Igor Raits --- .gitignore | 1 + rust-git-version.spec | 76 +++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 78 insertions(+) create mode 100644 .gitignore create mode 100644 rust-git-version.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c39483 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/git-version-0.3.4.crate diff --git a/rust-git-version.spec b/rust-git-version.spec new file mode 100644 index 0000000..d0be85d --- /dev/null +++ b/rust-git-version.spec @@ -0,0 +1,76 @@ +# Generated by rust2rpm 18 +# * Expects git repo +%bcond_with check +%global debug_package %{nil} + +%global crate git-version + +Name: rust-%{crate} +Version: 0.3.4 +Release: %autorelease +Summary: Compile the git version and dirty state into your program + +# Upstream license specification: BSD-2-Clause +License: BSD +URL: https://crates.io/crates/git-version +Source: %{crates_source} + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Compile the git version (tag name, or hash otherwise) and dirty state into your +program.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license COPYING +%doc README.md +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages +which use "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..c4b91ab --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (git-version-0.3.4.crate) = 5fdac1c1b2580e42cbf15b1caf5b077f48f921b21371d02d1954443843fc075bc1c218e112fee0878a41bdf6e528b2969c9cff76808a01996a56b3e046ec3dea