LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File cargo-bootstrap.spec of Package cargo-bootstrap (Project home:Ledest:devel)

Name:     cargo-bootstrap
Version:  0.12.0+nightly.20160621.50dad37
Release:  0
Summary:  Bootstrap Package for Cargo
License:  MIT or Apache-2.0
Group:    Development/Languages/Other
Url:      https://crates.io
Provides: cargo
Source0:  https://static.rust-lang.org/cargo-dist/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz
Source1:  https://static.rust-lang.org/cargo-dist/cargo-nightly-i686-unknown-linux-gnu.tar.gz
BuildRequires: rustc
Requires: rustc

%description
Bootstrap package for Cargo, crate host for
the Rust systems programming language.

%prep
%ifarch x86_64
%setup -T -b 0 -n cargo-nightly-x86_64-unknown-linux-gnu
%else
%setup -T -b 1 -n cargo-nightly-i686-unknown-linux-gnu
%endif

%build

%install
./install.sh --destdir=%{buildroot} --prefix=%{_prefix} --disable-ldconfig
rm %{buildroot}%{_prefix}/lib/rustlib/uninstall.sh
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
mv %{buildroot}%{_prefix}/etc/bash_completion.d/cargo %{buildroot}%{_sysconfdir}/bash_completion.d
rm %{buildroot}%{_datadir}/zsh/site-functions/_cargo
rm %{buildroot}%{_prefix}/lib/rustlib/install.log
rm %{buildroot}%{_prefix}/lib/rustlib/manifest-cargo
rm %{buildroot}%{_prefix}/lib/rustlib/components

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_bindir}/cargo
%config %{_sysconfdir}/bash_completion.d/cargo
%{_datadir}/man/man1/cargo*
%{_datadir}/doc/cargo
%{_prefix}/lib/rustlib