From 24bbcf62f683d3fafa7db0d562578988b9e8a75a Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Tue, 25 Feb 2020 02:08:04 +0100 Subject: [PATCH] Initial import Signed-off-by: Igor Raits --- .gitignore | 1 + filesize-fix-metadata.diff | 11 ++++++ rust-filesize.spec | 77 ++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 90 insertions(+) create mode 100644 .gitignore create mode 100644 filesize-fix-metadata.diff create mode 100644 rust-filesize.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..04d8876 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/filesize-0.1.0.crate diff --git a/filesize-fix-metadata.diff b/filesize-fix-metadata.diff new file mode 100644 index 0000000..417d84e --- /dev/null +++ b/filesize-fix-metadata.diff @@ -0,0 +1,11 @@ +--- filesize-0.1.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ filesize-0.1.0/Cargo.toml 2020-02-24T18:30:26.300761+00:00 +@@ -21,8 +21,5 @@ + categories = ["os"] + license = "MIT" + repository = "https://github.com/Freaky/rust-filesize" +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3.7" +-features = ["fileapi", "winerror"] + [badges.travis-ci] + repository = "Freaky/rust-filesize" diff --git a/rust-filesize.spec b/rust-filesize.spec new file mode 100644 index 0000000..04949e8 --- /dev/null +++ b/rust-filesize.spec @@ -0,0 +1,77 @@ +# Generated by rust2rpm 13 +%bcond_without check +%global debug_package %{nil} + +%global crate filesize + +Name: rust-%{crate} +Version: 0.1.0 +Release: 1%{?dist} +Summary: Find the physical space used by a file + +# Upstream license specification: MIT +License: MIT +URL: https://crates.io/crates/filesize +Source: %{crates_source} +# Initial patched metadata +# * No windows +Patch0: filesize-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Find the physical space used by a file.} + +%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 +%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 +* Mon Feb 24 20:30:26 EET 2020 Artem Polishchuk - 0.1.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..a02f94a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (filesize-0.1.0.crate) = 37f26fef59fe8ddc4d09101360e5680139ec5ab49c4a48a2c3f8ae713e094502c562b50f08bb29622f0bdfda6b6eddcd7989d94e3ed93127736a42301e9d6d42