Skip to content

Instantly share code, notes, and snippets.

@astanin
Created March 30, 2012 09:41
Show Gist options
  • Save astanin/2250390 to your computer and use it in GitHub Desktop.
Save astanin/2250390 to your computer and use it in GitHub Desktop.
rust-0.2 PKGBUILD
# Maintainer: Chris Bolton <chris@pixelgen.co>
pkgname=rust
pkgver=0.2
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc='A safe, concurrent, practical language from Mozilla.'
url='http://www.rust-lang.org/'
license=('MIT')
depends=('gcc-libs')
makedepends=('libffi' 'python2') # for llvm
source=("http://dl.rust-lang.org/dist/rust-${pkgver}.tar.gz")
sha256sums=('cedf679fd6bf46b63b9d754496920cbaa8c9ba4187d40f5f78fc28e775820f0d')
build() {
cd rust-${pkgver}
# needs llvm >= 3.0svn ...
# --llvm-root=/usr \
# use ${pkgdir} in --prefix because DESTDIR is unsupported in make install
./configure \
--prefix=${pkgdir}/usr \
--disable-docs
msg 's/python$/python2/'
find . -executable -exec grep -qe 'env python$' '{}' ';' -exec sed -i 's/env python$/env python2/' '{}' ';' -print
make
}
package() {
cd rust-${pkgver}
make install
install -d ${pkgdir}/usr/share/licenses/rust
install -m644 LICENSE.txt \
${pkgdir}/usr/share/licenses/rust
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment