mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-11 12:14:37 +08:00
57 lines
1.5 KiB
Bash
57 lines
1.5 KiB
Bash
# Contributions from Arch:
|
|
# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
|
|
# Contributor: Christopher Reimer <mail+aur@c-reimer.de>
|
|
|
|
pkgname=cargo
|
|
pkgver=0.16.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')
|
|
groups=('rust')
|
|
options=('!emptydirs')
|
|
source=("git+https://github.com/rust-lang/cargo.git#tag=$pkgver"
|
|
"git+https://github.com/rust-lang/rust-installer.git")
|
|
md5sums=('SKIP'
|
|
'SKIP')
|
|
|
|
prepare() {
|
|
cd "$pkgname"
|
|
|
|
git submodule init
|
|
git config submodule.src/rust-installer.url "$srcdir"/rust-installer
|
|
git submodule update
|
|
|
|
sed 's^share/doc^share/licenses^g' -i Makefile.in
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname"
|
|
|
|
./configure --prefix=/usr --enable-optimize
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname"
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
# Remove files that contains references to $srcdir or $pkgdir,
|
|
# or that conflicts with the rust package.
|
|
rm -f "$pkgdir/usr/lib/rustlib/"{install.log,manifest-cargo,uninstall.sh}
|
|
|
|
install -d "$pkgdir/usr/share/bash-completion/completions"
|
|
mv "$pkgdir/usr/etc/bash_completion.d/cargo" \
|
|
"$pkgdir/usr/share/bash-completion/completions/cargo"
|
|
|
|
for f in LICENSE-APACHE LICENSE-MIT LICENSE-THIRD-PARTY; do
|
|
install -Dm644 "$f" "$pkgdir/usr/share/licenses/$pkgname/$f"
|
|
done
|
|
}
|