# Contributions from Arch: # Maintainer: Alexander F Rødseth # Contributor: Christopher Reimer pkgname=cargo pkgver=0.20.0 pkgrel=1 pkgdesc='Rust package manager' url='http://crates.io/' arch=('x86_64') license=('APACHE' 'MIT' 'custom') depends=('curl' 'rust') makedepends=('git' 'setconf' 'python2' 'cmake' 'cargo') optdepends=('gcc: for compiling C source code with gcc' 'clang: for compiling C source code with clang') options=('!emptydirs') source=("git+https://github.com/rust-lang/cargo.git#tag=$pkgver") md5sums=('SKIP') build() { cd "$pkgname" cargo build --release } package() { # cargo upstream deleted the old autotools scripts in favor of their own # distribution tarball creation tools in the rust repo, which aren't suitable # for our use right now, so we'll have to install things manually for now. cd "$pkgname" cargo install --root "$pkgdir"/usr rm "$pkgdir"/usr/.crates.toml install -Dm644 src/etc/_cargo \ "$pkgdir"/usr/share/zsh/site-functions/_cargo install -Dm644 src/etc/cargo.bashcomp.sh \ "$pkgdir"/usr/share/bash-completion/completions/cargo install -d "$pkgdir"/usr/share/man/man1/ for f in src/etc/man/*; do cp "$f" "$pkgdir"/usr/share/man/man1/ done for f in LICENSE-APACHE LICENSE-MIT LICENSE-THIRD-PARTY; do install -Dm644 "$f" "$pkgdir/usr/share/licenses/$pkgname/$f" done }