mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
added community/rust, fixes #864
This commit is contained in:
parent
e73c43aea6
commit
a303d77b14
2 changed files with 80 additions and 0 deletions
69
community/rust/PKGBUILD
Normal file
69
community/rust/PKGBUILD
Normal file
|
@ -0,0 +1,69 @@
|
|||
# $Id$
|
||||
# Maintainer: Daniel Micay <danielmicay@gmail.com>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - use nightly build for ARM support until 0.11
|
||||
# - makedepend on rust, configure to use local rust instead of nonexistent binary download
|
||||
|
||||
buildarch=4
|
||||
noautobuild=1
|
||||
|
||||
pkgname=rust
|
||||
pkgver=0.10.20140608
|
||||
pkgrel=1
|
||||
arch=('i686' 'x86_64')
|
||||
pkgdesc='A safe, concurrent, practical language (Nightly build)'
|
||||
url='http://www.rust-lang.org/'
|
||||
license=('MIT' 'Apache')
|
||||
depends=(gcc shared-mime-info)
|
||||
makedepends=(libffi perl python2 curl rust)
|
||||
source=("http://static.rust-lang.org/dist/rust-nightly.tar.gz")
|
||||
sha256sums=('e0cfd141c7ec04460a985d517f5d185eb723f5f71ca785f3260d781923eeb00c')
|
||||
install=rust.install
|
||||
options=(staticlibs)
|
||||
|
||||
build() {
|
||||
cd rust-nightly
|
||||
|
||||
./configure --prefix=/usr --disable-docs --disable-rpath --disable-verify-install --enable-local-rust --local-rust-root=/usr
|
||||
|
||||
# avoid python makedepend (force fallback to python2)
|
||||
sed -i 's/^PYTHONVERSION.*/PYTHONVERSION := 3/' src/llvm/Makefile.rules
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
#check() {
|
||||
#cd rust-nightly
|
||||
#make check
|
||||
#}
|
||||
|
||||
package() {
|
||||
cd rust-nightly
|
||||
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"
|
||||
|
||||
cd lib
|
||||
rm rustlib/manifest
|
||||
ln -sf rustlib/$CARCH-unknown-linux-gnu/lib/* .
|
||||
}
|
11
community/rust/rust.install
Normal file
11
community/rust/rust.install
Normal file
|
@ -0,0 +1,11 @@
|
|||
post_install() {
|
||||
update-mime-database usr/share/mime >/dev/null
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
post_install
|
||||
}
|
Loading…
Reference in a new issue