diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b4fd0f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/lipsum-0.4.0.crate diff --git a/lipsum-0.4.0-fix-metadata.diff b/lipsum-0.4.0-fix-metadata.diff new file mode 100644 index 0000000..1c6568a --- /dev/null +++ b/lipsum-0.4.0-fix-metadata.diff @@ -0,0 +1,11 @@ +--- lipsum-0.4.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ lipsum-0.4.0/Cargo.toml 2017-11-13T18:44:59.150289+01:00 +@@ -25,7 +25,7 @@ + [dependencies.rand] + version = "0.3" + [dev-dependencies.version-sync] +-version = "0.3" ++version = "0.4" + [badges.travis-ci] + repository = "mgeisler/lipsum" + diff --git a/rust-lipsum.spec b/rust-lipsum.spec new file mode 100644 index 0000000..a1e7e00 --- /dev/null +++ b/rust-lipsum.spec @@ -0,0 +1,68 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate lipsum + +Name: rust-%{crate} +Version: 0.4.0 +Release: 1%{?dist} +Summary: Lorem ipsum text generation library + +License: MIT +URL: https://crates.io/crates/lipsum +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Bump version-sync to 0.4, https://github.com/mgeisler/lipsum/commit/be9093948108425853a48b16ac5591aca8e4e03b +Patch0: lipsum-0.4.0-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(rand) >= 0.3.0 with crate(rand) < 0.4.0) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(version-sync) >= 0.4.0 with crate(version-sync) < 0.5.0) +%endif + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Lipsum is a lorem ipsum text generation library. Use this if you need +some filler text for your application. + +The text is generated using a simple Markov chain, which you can also +instantiate to generate your own pieces of pseudo-random text. + +This package contains library source intended for building other packages +which use %{crate} from crates.io. + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%files devel +%license LICENSE +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ + +%changelog +* Mon Nov 13 2017 Igor Gnatenko - 0.4.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..4cf1d44 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (lipsum-0.4.0.crate) = 9f1b234c146ee69b3d629927ca0785aa98829eba77c4e6adc1aa39a8a371b367e39e89cf95807f544a5646ae8cfe58113d677d21811c5600f185447a37a6da67