core/cargo/PKGBUILD

51 lines
1.4 KiB
Bash
Raw Normal View History

2017-03-06 07:37:30 +08:00
# Contributions from Arch:
2017-01-26 01:28:45 +08:00
# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: Christopher Reimer <mail+aur@c-reimer.de>
pkgname=cargo
2017-07-22 13:36:56 +08:00
pkgver=0.20.0
2017-01-26 01:28:45 +08:00
pkgrel=1
pkgdesc='Rust package manager'
url='http://crates.io/'
2017-03-06 07:37:30 +08:00
arch=('x86_64')
2017-01-26 01:28:45 +08:00
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')
2017-07-22 13:36:56 +08:00
source=("git+https://github.com/rust-lang/cargo.git#tag=$pkgver")
md5sums=('SKIP')
2017-01-26 01:28:45 +08:00
build() {
cd "$pkgname"
2017-07-22 13:36:56 +08:00
cargo build --release
2017-01-26 01:28:45 +08:00
}
package() {
2017-07-22 13:36:56 +08:00
# 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.
2017-01-26 01:28:45 +08:00
cd "$pkgname"
2017-07-22 13:36:56 +08:00
cargo install --root "$pkgdir"/usr
2017-01-26 01:28:45 +08:00
2017-07-22 13:36:56 +08:00
rm "$pkgdir"/usr/.crates.toml
2017-01-26 01:28:45 +08:00
2017-07-22 13:36:56 +08:00
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
2017-01-26 01:28:45 +08:00
for f in LICENSE-APACHE LICENSE-MIT LICENSE-THIRD-PARTY; do
install -Dm644 "$f" "$pkgdir/usr/share/licenses/$pkgname/$f"
done
}