core/rust/PKGBUILD

55 lines
1.5 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-05-16 11:14:46 +08:00
pkgver=1.26.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')
2018-03-30 09:00:58 +08:00
makedepends=('rust' 'libffi' 'perl' 'python2' 'curl' 'cmake' 'ninja')
source=("https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz"
config.toml)
2018-05-16 11:14:46 +08:00
sha256sums=('4fb09bc4e233b71dcbe08a37a3f38cabc32219745ec6a628b18a55a1232281dd'
2018-03-30 09:00:58 +08:00
'c0988fa7cb0dd3686379df9e0c45104895b69519a258f8a4ae56bd6af1670639')
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"
2018-03-30 09:00:58 +08:00
cp "$srcdir"/config.toml config.toml
2017-07-22 13:21:42 +08:00
}
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
2018-03-30 09:00:58 +08:00
install -d "$pkgdir"/usr/share/bash-completion
mv "$pkgdir"/etc/bash_completion.d/ "$pkgdir"/usr/share/bash-completion/completions/
rm rustlib/uninstall.sh # remove uninstall.sh, pacman manages the files anyway
2015-07-05 00:12:42 +08:00
}