blob: b6831ab5dadbc8e96e0a419d7e8be3d0d692c74b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# $Id: PKGBUILD 97658 2013-09-27 01:45:47Z thestinger $
# Maintainer: Daniel Micay <danielmicay@gmail.com>
pkgname=rust
pkgver=0.8
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc='A safe, concurrent, practical language'
url='http://www.rust-lang.org/'
license=('MIT' 'Apache')
depends=(gcc shared-mime-info)
makedepends=(libffi perl python2 curl chrpath)
source=("http://static.rust-lang.org/dist/rust-${pkgver}.tar.gz"
"http://static.rust-lang.org/dist/rust-${pkgver}.tar.gz.asc")
sha256sums=('42f791ab1537357fe0f63d67ffe6bcb64ecf16b2bd3f1484ab589823f5914182'
'SKIP')
install=rust.install
build() {
cd rust-$pkgver
./configure --prefix=/usr --disable-docs
# avoid python makedepend (force fallback to python2)
sed -i 's/^PYTHONVERSION.*/PYTHONVERSION := 3/' src/llvm/Makefile.rules
make
}
#check() {
#cd rust-$pkgver
#make check
#}
package() {
cd rust-$pkgver
make DESTDIR="$pkgdir" install
mkdir -p "$pkgdir/usr/share/vim" "$pkgdir/usr/share/licenses/$pkgname"
cp -a src/etc/vim "$pkgdir/usr/share/vim/vimfiles"
find "$pkgdir/usr/share/vim" -type f -exec chmod 644 {} +
find "$pkgdir/usr/share/vim" -type d -exec chmod 755 {} +
install -Dm644 src/etc/zsh/_rust "$pkgdir/usr/share/zsh/site-functions/_rust"
install -Dm644 src/etc/kate/rust.xml "$pkgdir/usr/share/apps/katepart/syntax/rust.xml"
install -Dm644 src/etc/gedit/share/mime/packages/rust.xml \
"$pkgdir/usr/share/mime/packages/rust.xml"
install -Dm644 src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang \
"$pkgdir/usr/share/gtksourceview-3.0/language-specs/rust.lang"
install -m644 LICENSE-APACHE "$pkgdir/usr/share/licenses/$pkgname"
install -m644 LICENSE-MIT "$pkgdir/usr/share/licenses/$pkgname"
cd src/etc/emacs
install -Dm644 rust-mode.el "$pkgdir/usr/share/emacs/site-lisp/rust-mode.el"
cd "$pkgdir/usr"
# https://github.com/mozilla/rust/issues/5219
chrpath -d bin/* lib/*.so lib/rustc/*/lib/*.so
cd lib
ln -sf rustc/$CARCH-unknown-linux-gnu/lib/* .
}
|