From 6a79b1b5d0efabe99a4eb2436331324784687a8f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 6 Dec 2018 12:22:01 -0800 Subject: [PATCH] Initial package --- .gitignore | 1 + rust-bytesize.spec | 84 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 86 insertions(+) create mode 100644 .gitignore create mode 100644 rust-bytesize.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2513941 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bytesize-1.0.0.crate diff --git a/rust-bytesize.spec b/rust-bytesize.spec new file mode 100644 index 0000000..687c2dd --- /dev/null +++ b/rust-bytesize.spec @@ -0,0 +1,84 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate bytesize + +Name: rust-%{crate} +Version: 1.0.0 +Release: 1%{?dist} +Summary: Human-readable bytes representations + +# Upstream license specification: Apache-2.0 +License: ASL 2.0 +URL: https://crates.io/crates/bytesize +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0) +BuildRequires: (crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0) + +%global _description \ +A utility for human-readable bytes representations. + +%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 LICENSE +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/.travis.yml + +%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}/Cargo.toml + +%package -n %{name}+serde-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-devel %{_description} + +This package contains library source intended for building other packages +which use "serde" feature of "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Thu Dec 06 2018 Josh Stone - 1.0.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..81a9cc8 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (bytesize-1.0.0.crate) = a8837bc05efbf6faf55ce76cffb0f8ef2f47baad2f65875da246f4a8f1052af0fcd8f156950deac0e57e015183d740e0d8ced1e6da1aaecf03244ad370d926b8