# To bootstrap from scratch, set the date from src/snapshots.txt # e.g. 0.11.0 wants 2016-03-21 %bcond_without bootstrap %global bootstrap_date 2016-08-20 # (using a newer version than required to get vendor directories and more archs) %if 0%{?rhel} %global _with_bundled_libgit2 1 %endif %bcond_with bundled_libgit2 Name: cargo Version: 0.14.0 Release: 1.el7 Summary: Rust's package manager and build tool License: ASL 2.0 or MIT URL: https://crates.io/ Source0: https://github.com/rust-lang/%{name}/archive/%{version}/%{name}-%{version}.tar.gz # submodule, bundled for local installation only, not distributed %global rust_installer 4f994850808a572e2cc8d43f968893c8e942e9bf Source1: https://github.com/rust-lang/rust-installer/archive/%{rust_installer}/rust-installer-%{rust_installer}.tar.gz %if %with bootstrap %global bootstrap_dist https://static.rust-lang.org/cargo-dist %global bootstrap_base %{bootstrap_dist}/%{bootstrap_date}/%{name}-nightly Source10: %{bootstrap_base}-x86_64-unknown-linux-gnu.tar.gz Source11: %{bootstrap_base}-i686-unknown-linux-gnu.tar.gz Source12: %{bootstrap_base}-armv7-unknown-linux-gnueabihf.tar.gz Source13: %{bootstrap_base}-aarch64-unknown-linux-gnu.tar.gz %endif # Use vendored crate dependencies so we can build offline. # Created using https://github.com/alexcrichton/cargo-vendor/ 0.1.3 # It's so big because some of the -sys crates include the C library source they # want to link to. With our -devel buildreqs in place, they'll be used instead. # FIXME: These should all eventually be packaged on their own! Source100: %{name}-%{version}-vendor.tar.xz Patch0: unused_resolveresult.patch # Only x86_64 and i686 are Tier 1 platforms at this time. ExclusiveArch: x86_64 i686 armv7hl aarch64 %ifarch armv7hl %global rust_triple armv7-unknown-linux-gnueabihf %else %global rust_triple %{_target_cpu}-unknown-linux-gnu %endif BuildRequires: rust BuildRequires: make BuildRequires: cmake BuildRequires: gcc BuildRequires: python2 >= 2.7 BuildRequires: curl %if %without bootstrap BuildRequires: %{name} >= 0.13.0 %global local_cargo %{_bindir}/%{name} %else %global bootstrap_root cargo-nightly-%{rust_triple} %global local_cargo %{_builddir}/%{name}-%{version}/%{bootstrap_root}/cargo/bin/cargo %endif # Indirect dependencies for vendored -sys crates above BuildRequires: libcurl-devel BuildRequires: libssh2-devel BuildRequires: zlib-devel BuildRequires: pkgconfig %if %with bundled_libgit2 Provides: bundled(libgit2-devel) = 0.23.0 %else BuildRequires: libgit2-devel >= 0.23 %endif %if 0%{?fedora} >= 26 # https://bugzilla.redhat.com/show_bug.cgi?id=1383778 BuildRequires: compat-openssl10-devel %else BuildRequires: openssl-devel %endif # Cargo is not much use without Rust Requires: rust %description Cargo is a tool that allows Rust projects to declare their various dependencies and ensure that you'll always get a repeatable build. %prep %setup -q # rust-installer %setup -q -T -D -a 1 rmdir src/rust-installer mv rust-installer-%{rust_installer} src/rust-installer # vendored crates %setup -q -T -D -b 100 mv ../vendor ../%{name}-%{version}-vendor mkdir -p .cargo cat >.cargo/config < - 0.14.0-1 - Update to 0.14.0. - Merge package changes from rawhide. - Bootstrap aarch64. * Tue Sep 20 2016 Josh Stone - 0.12.0-3.2 - Rebuild without bootstrap binaries. * Mon Sep 19 2016 Josh Stone - 0.12.0-3.1 - Bootstrap el7, with bundled libgit2 * Sat Sep 03 2016 Josh Stone - 0.12.0-3 - Rebuild without bootstrap binaries. * Fri Sep 02 2016 Josh Stone - 0.12.0-2 - Bootstrap armv7hl. - Patch dl-snapshot.py to ignore hashes on unknown archs. * Wed Aug 24 2016 Josh Stone - 0.12.0-1 - Update to 0.12.0. * Mon Aug 22 2016 Josh Stone 0.11.0-3 - Rebuild without bootstrap binaries. - Add a runtime requirement on rust. * Mon Aug 22 2016 Josh Stone - 0.11.0-2 - Initial import into Fedora (#1357749), bootstrapped * Sun Jul 17 2016 Josh Stone - 0.11.0-1 - Initial package, bootstrapped