mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 17:04:36 +08:00
50 lines
1.5 KiB
Bash
50 lines
1.5 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.18.0
|
|
pkgrel=1
|
|
arch=('x86_64')
|
|
pkgdesc='Systems programming language focused on safety, speed and concurrency'
|
|
url='https://www.rust-lang.org/'
|
|
license=('MIT' 'Apache')
|
|
depends=('gcc-libs' 'llvm-libs')
|
|
makedepends=('rust' 'cargo' 'libffi' 'perl' 'python2' 'curl' 'jemalloc' 'llvm')
|
|
optdepends=('cargo')
|
|
source=("http://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz")
|
|
sha256sums=('d2dc36e99b9e2269488b2bcddde43c234e6bde03edf70cba82a027ff49c36111')
|
|
install="$pkgname.install"
|
|
options=('staticlibs' '!strip' '!emptydirs')
|
|
|
|
build() {
|
|
cd "rustc-$pkgver-src"
|
|
|
|
./configure --prefix=/usr \
|
|
--release-channel=stable \
|
|
--llvm-root=/usr \
|
|
--disable-codegen-tests \
|
|
--jemalloc-root=/usr/lib \
|
|
--enable-local-rust
|
|
|
|
export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi"
|
|
|
|
msg2 "Run build under x.py"
|
|
python2 ./x.py build
|
|
}
|
|
|
|
package() {
|
|
cd "rustc-$pkgver-src"
|
|
|
|
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
|
|
}
|