From 8e5324db3c12f74a1ee1c1e7706d8c39d903555d Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 20 Jul 2017 20:21:49 +0200 Subject: [PATCH] - pl, cleanup, completion packages --- cargo.spec | 85 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 21 deletions(-) diff --git a/cargo.spec b/cargo.spec index f13bf86..7da79a3 100644 --- a/cargo.spec +++ b/cargo.spec @@ -1,17 +1,18 @@ # # Conditional build: -%bcond_with bootstrap +%bcond_with bootstrap # bootstrap using precompiled binaries %bcond_without tests # build without tests -%define cargo_version %{version} -%define cargo_bootstrap 0.18.0 +%define cargo_version %{version} +%define cargo_bootstrap 0.18.0 Summary: Rust's package manager and build tool +Summary(pl.UTF-8): Zarządca pakietów i narzędzie do budowania Name: cargo Version: 0.19.0 Release: 1 -License: ASL 2.0 or MIT -Group: Development/Libraries +License: Apache v2.0 or MIT +Group: Development/Tools Source0: https://github.com/rust-lang/cargo/archive/%{cargo_version}/%{name}-%{cargo_version}.tar.gz # Source0-md5: e46e9f565df765b63f641c0d933297d7 # submodule, bundled for local installation only, not distributed @@ -46,7 +47,7 @@ Requires: rust ExclusiveArch: %{x8664} %{ix86} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define rust_triple %{_target_cpu}-unknown-linux-gnu +%define rust_triple %{_target_cpu}-unknown-linux-gnu %if %{with bootstrap} %define bootstrap_root cargo-%{cargo_bootstrap}-%{rust_triple} @@ -63,6 +64,36 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) Cargo is a tool that allows Rust projects to declare their various dependencies and ensure that you'll always get a repeatable build. +%description -l pl.UTF-8 +Cargo to narzędzie pozwalające projektom w języku Rust deklarować ich +zależności i zapewniające powtarzalność procesu budowania. + +%package -n bash-completion-cargo +Summary: Bash completion for cargo command +Summary(pl.UTF-8): Bashowe dopełnianie parametrów polecenia cargo +Group: Applications/Shells +Requires: %{name} = %{version}-%{release} +Requires: bash-completion + +%description -n bash-completion-cargo +Bash completion for cargo command. + +%description -n bash-completion-cargo -l pl.UTF-8 +Bashowe dopełnianie parametrów polecenia cargo. + +%package -n zsh-completion-cargo +Summary: Zsh completion for cargo command +Summary(pl.UTF-8): Dopełnianie parametrów polecenia cargo w powłoce Zsh +Group: Applications/Shells +Requires: %{name} = %{version}-%{release} +Requires: bash-completion + +%description -n zsh-completion-cargo +Zsh completion for cargo command. + +%description -n zsh-completion-cargo -l pl.UTF-8 +Dopełnianie parametrów polecenia cargo w powłoce Zsh. + %prep %setup -q -n %{name}-%{cargo_version} -a1 -a4 %if %{with bootstrap} @@ -77,11 +108,10 @@ test -f '%{local_cargo}' %patch0 -p1 rmdir src/rust-installer -mv rust-installer-%{rust_installer} src/rust-installer +%{__mv} rust-installer-%{rust_installer} src/rust-installer -# use our offline registry and custom rustc flags +# use our offline registry export CARGO_HOME="`pwd`/.cargo" -export RUSTFLAGS="%{rustflags}" mkdir -p "$CARGO_HOME" cat >.cargo/config <