aboutsummaryrefslogtreecommitdiffstats
path: root/rustc/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'rustc/PKGBUILD')
-rw-r--r--rustc/PKGBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/rustc/PKGBUILD b/rustc/PKGBUILD
new file mode 100644
index 0000000..0adefa9
--- /dev/null
+++ b/rustc/PKGBUILD
@@ -0,0 +1,57 @@
+#Maintainer: Zee Eichel <zee@dracos-linux.org>
+
+pkgname=rustc
+pkgver=1.32.0
+pkgrel=1
+pkgdesc="An Programer to safe, concurrent, practical language"
+arch=('x86_64')
+url="https://static.rust-lang.org/"
+license=('BSD')
+depends=('curl' 'libssh2' 'cmake')
+makedepends=('python2')
+source=("https://static.rust-lang.org/dist/rustc-1.32.0-src.tar.gz")
+sha256sums=('4c594c7712a0e7e8eae6526c464bf6ea1d82f77b4f61717c3fc28fb27ba2224a')
+
+prepare() {
+ cd "$pkgname"-"$pkgver"-src
+ mkdir -pv $pkgdir/opt/rustc &&
+ ln -svfin rustc-1.32.0 $pkgdir/opt/rustc
+
+cat << EOF > config.toml
+# see config.toml.example for more possible options
+[llvm]
+ninja = true
+targets = "X86"
+experimental-targets = ""
+
+[build]
+docs = false
+extended = true
+
+[install]
+prefix = "/opt/rustc-1.32.0"
+docdir = "share/doc/rustc-1.32.0"
+
+[rust]
+channel = "stable"
+rpath = false
+codegen-tests = false
+backtrace-on-ice = true
+EOF
+}
+
+build() {
+ cd "$pkgname"-"$pkgver"-src
+ export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi" &&
+ python3 ./x.py build --exclude src/tools/miri
+}
+
+package() {
+ cd "$pkgname"-"$pkgver"-src
+ export LIBSSH2_SYS_USE_PKG_CONFIG=1 &&
+ DESTDIR=${srcdir}/install python3 ./x.py install &&
+ unset LIBSSH2_SYS_USE_PKG_CONFIG
+ chown -R root:root install &&
+ cp -a install/* $pkgdir/
+ install=rustc.install
+}