62 lines
1.6 KiB
Bash
62 lines
1.6 KiB
Bash
# Template file for 'cargo'
|
|
pkgname=cargo
|
|
version=0.29.0
|
|
revision=1
|
|
hostmakedepends="rust python curl cmake pkg-config"
|
|
makedepends="libcurl-devel libgit2-devel"
|
|
depends="rust"
|
|
short_desc="Rust package manager"
|
|
maintainer="Enno Boland <gottox@voidlinux.eu>"
|
|
license="MIT, Apache-2.0"
|
|
homepage="https://crates.io/"
|
|
distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz"
|
|
checksum=9aedb9536ec0b92059ed06b79a72798daf14e3fbcf29fac308ac07d23a9493d3
|
|
nocross=yes
|
|
|
|
case "$XBPS_MACHINE" in
|
|
x86_64-musl)
|
|
distfiles+="
|
|
https://repo.voidlinux.eu/distfiles/cargo-0.26.0-x86_64-unknown-linux-musl.tar.gz"
|
|
checksum+="
|
|
406a348567577cb2859749f1b1e1a843de20e7c1f305de89d3a3760635c4979e"
|
|
;;
|
|
x86_64)
|
|
distfiles+="
|
|
https://static.rust-lang.org/dist/cargo-0.26.0-x86_64-unknown-linux-gnu.tar.gz"
|
|
checksum+="
|
|
9ba227f2364f618dc9415dacf3a5dce17458e1cb9f6d4fe860416cb68db894e4"
|
|
;;
|
|
i686)
|
|
distfiles+="
|
|
https://static.rust-lang.org/dist/cargo-0.26.0-i686-unknown-linux-gnu.tar.gz"
|
|
checksum+="
|
|
200c24872796d19e14ecc1a71febc28e7c08b4cde35712e5154ec0d79350f81e"
|
|
;;
|
|
esac
|
|
|
|
post_extract() {
|
|
mkdir -p target/snapshot
|
|
case "$XBPS_MACHINE" in
|
|
x86_64-musl) cp ../cargo cargo;;
|
|
*) cp ../cargo-*/cargo/bin/cargo cargo;;
|
|
esac
|
|
}
|
|
do_build() {
|
|
export LIBGIT2_SYS_USE_PKG_CONFIG=yes
|
|
export CARGO_HOME="${wrksrc}/.cargo"
|
|
export RUST_BACKTRACE=1
|
|
./cargo build --release
|
|
}
|
|
do_install() {
|
|
vbin target/release/cargo
|
|
for f in src/etc/man/*.?; do
|
|
vman $f
|
|
done
|
|
vinstall src/etc/cargo.bashcomp.sh 0644 usr/share/bash-completion/completions cargo
|
|
vinstall src/etc/_cargo 0644 usr/share/zsh/site-functions
|
|
|
|
vlicense LICENSE-APACHE
|
|
vlicense LICENSE-MIT
|
|
vlicense LICENSE-THIRD-PARTY
|
|
}
|