mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 18:17:14 +08:00
45 lines
1.3 KiB
Bash
45 lines
1.3 KiB
Bash
# Originally imported from Arch Linux with
|
|
# Arch Maintainer: Alexander Rødseth <rodseth@gmail.com>
|
|
# Arch Contributor: Daniel Micay <danielmicay@gmail.com>
|
|
|
|
pkgname=rust
|
|
pkgver=1.4.0
|
|
pkgrel=1
|
|
arch=('x86_64')
|
|
pkgdesc='Systems programming language focused on safety, speed and concurrency'
|
|
url='http://www.rust-lang.org/'
|
|
license=('MIT' 'Apache')
|
|
makedepends=('libffi' 'perl' 'python2' 'curl')
|
|
source=("http://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz")
|
|
sha256sums=('1c0dfdce5c85d8098fcebb9adf1493847ab40c1dfaa8cc997af09b2ef0aa8211')
|
|
install="$pkgname.install"
|
|
options=('staticlibs' '!strip')
|
|
|
|
prepare() {
|
|
cd "rustc-$pkgver"
|
|
|
|
sed -i 's/^PYTHONVERSION.*/PYTHONVERSION := 3/' src/llvm/Makefile.rules
|
|
}
|
|
|
|
build() {
|
|
cd "rustc-$pkgver"
|
|
|
|
./configure --prefix=/usr --disable-docs --release-channel=stable
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "rustc-$pkgver"
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
install -Dm644 LICENSE-APACHE \
|
|
"$pkgdir/usr/share/licenses/$pkgname/LICENSE-APACHE"
|
|
install -Dm644 LICENSE-MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
|
|
|
|
cd "$pkgdir/usr/lib"
|
|
rm rustlib/{components,manifest-rustc,rust-installer-version}
|
|
ln -sf rustlib/$CARCH-unknown-linux-gnu/lib/*.so .
|
|
rm rustlib/uninstall.sh # remove uninstall.sh, pacman manages the files anyway
|
|
}
|