From 14c63ebd329ff3c9c4863f429d5c1fb99929ebb9 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Dec 27 2019 06:12:15 +0000 Subject: Initial package for F31 Signed-off-by: Igor Gnatenko --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..13f2396 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/starship-0.32.1.crate diff --git a/.rust2rpm.conf b/.rust2rpm.conf new file mode 100644 index 0000000..489a32d --- /dev/null +++ b/.rust2rpm.conf @@ -0,0 +1,3 @@ +[DEFAULT] +buildrequires = + git-core \ No newline at end of file diff --git a/rust-starship.spec b/rust-starship.spec new file mode 100644 index 0000000..2357793 --- /dev/null +++ b/rust-starship.spec @@ -0,0 +1,65 @@ +# Generated by rust2rpm 13 +%bcond_without check +# No devel stuff in released Fedora +%global __cargo_is_lib() false + +%global crate starship + +Name: rust-%{crate} +Version: 0.32.1 +Release: 1%{?dist}.1 +Summary: Cross-shell prompt for astronauts + +# Upstream license specification: ISC +License: ISC +URL: https://crates.io/crates/starship +Source: %{crates_source} +# Initial patched metadata +# * Use default features (OpenSSL) for reqwest, essentially revert of https://github.com/starship/starship/commit/d1b725a47cda1047546fb3998ff8f8a61ed4a48b +Patch0: starship-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging + +%global _description %{expand: +Cross-shell prompt for astronauts. ☄🌌️.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%doc README.md +%{_bindir}/starship + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +# https://github.com/starship/starship/issues/755 +sed -i -e '/EXE_PATH/s|/debug/|/release/|' tests/testsuite/common.rs +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires +%if %{with check} +echo 'git-core' +%endif + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Thu Dec 26 11:55:11 CET 2019 Igor Gnatenko - 0.32.1-1.1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..dd12553 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (starship-0.32.1.crate) = 6ff8853da4aee03464271c4c0f008f97a182fa27ee56cad481768f5feb5028346a064e4a9490a3709b3290191980537955afbb1405c0677df3a1291835e354b5 diff --git a/starship-fix-metadata.diff b/starship-fix-metadata.diff new file mode 100644 index 0000000..915cde4 --- /dev/null +++ b/starship-fix-metadata.diff @@ -0,0 +1,11 @@ +--- starship-0.32.1/Cargo.toml 2019-12-20T20:46:32+00:00 ++++ starship-0.32.1/Cargo.toml 2019-12-26T07:19:53.098247+00:00 +@@ -84,8 +84,6 @@ + + [dependencies.reqwest] + version = "0.9.24" +-features = ["rustls-tls"] +-default-features = false + + [dependencies.serde_json] + version = "1.0.44"