summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO32
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD51
-rw-r--r--post.install8
4 files changed, 95 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..439b02c54044
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+# Generated by mksrcinfo v8
+# Fri May 6 15:29:34 UTC 2016
+pkgbase = rustup-git
+ pkgdesc = The Rust toolchain installer
+ pkgver = 0.1.8.r21.g2da4bef
+ pkgrel = 1
+ url = https://github.com/rust-lang-nursery/rustup.rs<Paste>
+ install = post.install
+ arch = any
+ license = MIT
+ license = Apache
+ makedepends = cargo-nightly
+ makedepends = git
+ provides = rust
+ provides = cargo
+ provides = rust-nightly
+ provides = cargo-nightly
+ provides = rustup
+ conflicts = rust
+ conflicts = cargo
+ conflicts = rust-nightly
+ conflicts = rust-nightly-bin
+ conflicts = multirust
+ conflicts = multirust-git
+ conflicts = rustup
+ replaces = multirust
+ replaces = multirust-git
+ source = rustup-git::git+https://github.com/rust-lang-nursery/rustup.rs.git
+ md5sums = SKIP
+
+pkgname = rustup-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..21cfdef0463e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+src/
+pkg/
+*.pkg.tar.xz
+*.src.tar.xz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..349b272a5c82
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Jon Gjengset <jon@tsp.io>
+pkgname=rustup-git
+pkgver=0.1.8.r21.g2da4bef
+pkgrel=1
+pkgdesc="The Rust toolchain installer"
+arch=('any')
+url="https://github.com/rust-lang-nursery/rustup.rs<Paste>"
+license=('MIT' 'Apache')
+makedepends=('cargo-nightly' 'git')
+provides=('rust' 'cargo' 'rust-nightly' 'cargo-nightly' 'rustup')
+conflicts=('rust' 'cargo' 'rust-nightly' 'rust-nightly-bin' 'multirust' 'multirust-git' 'rustup')
+replaces=('multirust' 'multirust-git')
+install='post.install'
+source=("${pkgname}::git+https://github.com/rust-lang-nursery/rustup.rs.git")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${pkgname}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "$pkgname"
+ # we (currently) need to build using beta or nightly
+ # this can hopefully go away eventually
+ if rustc --version | grep -E 'beta|nightly'; then
+ msg2 "Building rustup-init using cargo"
+ cargo build --release --bin rustup-init
+ elif command -v rustup >/dev/null 2>&1; then
+ msg2 "Building rustup-init using old rustup"
+ rustup run nightly cargo build --release --bin rustup-init
+ elif command -v multirust >/dev/null 2>&1; then
+ msg2 "Building rustup-init using multirust"
+ multirust run nightly cargo build --release --bin rustup-init
+ else
+ echo "Could not find beta/nightly cargo to use for compilation"
+ exit 1
+ fi
+
+ msg2 "Running rustup-init"
+ mkdir -p "$srcdir/tmp/.cargo"
+ env "HOME=$srcdir/tmp" target/release/rustup-init -y --no-modify-path
+}
+
+package() {
+ cd "$pkgname"
+ install -dm755 "$pkgdir/usr/bin"
+ cp "$srcdir/tmp/.cargo/bin"/* "$pkgdir/usr/bin/"
+}
+
+# vim:filetype=sh:
diff --git a/post.install b/post.install
new file mode 100644
index 000000000000..bfce9e298927
--- /dev/null
+++ b/post.install
@@ -0,0 +1,8 @@
+post_install() {
+ echo "You may need to run rustup update stable"
+ echo "and possibly also rustup self upgrade-data"
+}
+
+post_upgrade() {
+ echo "You may need to run rustup self upgrade-data"
+}