summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Gjengset2016-05-06 11:29:44 -0400
committerJon Gjengset2016-05-06 11:29:44 -0400
commit721fd9a14428050d65225c999f2d7e277c7241c7 (patch)
tree0c2612b3b59047770ba15a492b0d0638622576c3
downloadaur-721fd9a14428050d65225c999f2d7e277c7241c7.tar.gz
Initial release
-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 00000000000..439b02c5404
--- /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 00000000000..21cfdef0463
--- /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 00000000000..349b272a5c8
--- /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 00000000000..bfce9e29892
--- /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"
+}