core/rust/PKGBUILD

52 lines
1.4 KiB
Bash
Raw Normal View History

2015-07-05 00:12:42 +08:00
# Originally imported from Arch Linux with
# Arch Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Arch Contributor: Daniel Micay <danielmicay@gmail.com>
pkgname=rust
2018-02-19 17:38:57 +08:00
pkgver=1.24.0
2015-09-21 19:27:04 +08:00
pkgrel=1
2015-07-08 17:32:14 +08:00
arch=('x86_64')
2015-07-05 00:12:42 +08:00
pkgdesc='Systems programming language focused on safety, speed and concurrency'
2017-03-06 07:25:22 +08:00
url='https://www.rust-lang.org/'
2015-07-05 00:12:42 +08:00
license=('MIT' 'Apache')
2017-09-21 21:20:44 +08:00
provides=('cargo')
conflicts=('cargo')
replaces=('cargo')
2018-02-19 17:38:57 +08:00
depends=('gcc-libs' 'curl' 'libssh2')
2017-11-27 14:21:17 +08:00
makedepends=('rust' 'libffi' 'perl' 'python2' 'curl' 'cmake')
2017-07-22 13:21:42 +08:00
source=("http://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz"
bootstrap-config.toml)
2018-02-19 17:38:57 +08:00
sha256sums=('bb8276f6044e877e447f29f566e4bbf820fa51fea2f912d59b73233ffd95639f'
'8e30fcd8633e1900056ecbcc7267fea23e8e08889460239c614d4dcd796ce4f3')
2015-07-05 00:12:42 +08:00
install="$pkgname.install"
2017-03-06 07:25:22 +08:00
options=('staticlibs' '!strip' '!emptydirs')
2015-07-05 00:12:42 +08:00
2017-07-22 13:21:42 +08:00
prepare() {
2017-03-06 07:25:22 +08:00
cd "rustc-$pkgver-src"
2017-07-22 13:21:42 +08:00
cp "$srcdir"/bootstrap-config.toml config.toml
}
2017-03-06 07:25:22 +08:00
2017-07-22 13:21:42 +08:00
build() {
cd "rustc-$pkgver-src"
2015-07-05 00:12:42 +08:00
2017-06-21 08:24:35 +08:00
msg2 "Run build under x.py"
python2 ./x.py build
2015-07-05 00:12:42 +08:00
}
package() {
2017-03-06 07:25:22 +08:00
cd "rustc-$pkgver-src"
2015-07-05 00:12:42 +08:00
2017-07-22 13:21:42 +08:00
DESTDIR="$pkgdir" python2 ./x.py install
2015-07-05 00:12:42 +08:00
2017-11-27 14:21:17 +08:00
for license in APACHE MIT; do install -Dm644 "LICENSE-$license" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE-$license"; done
2015-07-05 00:12:42 +08:00
cd "$pkgdir/usr/lib"
2017-11-27 14:21:17 +08:00
2015-07-05 00:12:42 +08:00
rm rustlib/{components,manifest-rustc,rust-installer-version}
ln -sf rustlib/$CARCH-unknown-linux-gnu/lib/*.so .
2017-11-27 14:21:17 +08:00
rm rustlib/uninstall.sh # remove uninstall.sh, pacman manages the files anyway
2015-07-05 00:12:42 +08:00
}