summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Gjengset2016-05-31 16:05:53 -0400
committerJon Gjengset2016-05-31 16:05:53 -0400
commit8515a009276f6d6ac16f6187a0c1862347f0723c (patch)
tree6d036dc355096bb9cd0f90be9bfbeed77cf6cc55
parenta21f783cd377bcd20c0f04a0c597c96aee4c8b5a (diff)
downloadaur-8515a009276f6d6ac16f6187a0c1862347f0723c.tar.gz
Use same build steps as rustup
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD56
2 files changed, 41 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 452ff6c6800..f88cf9bd966 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
# Generated by mksrcinfo v8
-# Thu May 12 16:03:18 UTC 2016
+# Tue May 31 20:05:39 UTC 2016
pkgbase = rustup-git
pkgdesc = The Rust toolchain installer
- pkgver = 0.1.9.r4.ga4ad83f
+ pkgver = 0.1.11.r35.gba855de
pkgrel = 1
url = https://github.com/rust-lang-nursery/rustup.rs
install = post.install
arch = any
license = MIT
license = Apache
- makedepends = cargo-nightly
makedepends = git
provides = rust
provides = cargo
@@ -26,6 +25,10 @@ pkgbase = rustup-git
replaces = multirust
replaces = multirust-git
source = rustup-git::git+https://github.com/rust-lang-nursery/rustup.rs.git
+ source = rust-nightly--unknown-linux-gnu-2016-05-10.tar.gz::https://static.rust-lang.org/dist/2016-05-10/rust-nightly--unknown-linux-gnu.tar.gz
+ source = rust-nightly--unknown-linux-gnu-2016-05-10.tar.gz.asc::https://static.rust-lang.org/dist/2016-05-10/rust-nightly--unknown-linux-gnu.tar.gz.asc
+ md5sums = SKIP
+ md5sums = 009ccdef55366033a1db0f74762a7fa3
md5sums = SKIP
pkgname = rustup-git
diff --git a/PKGBUILD b/PKGBUILD
index 83efaabff48..15a476eba6c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,39 @@
# Maintainer: Jon Gjengset <jon@tsp.io>
pkgname=rustup-git
-pkgver=0.1.9.r4.ga4ad83f
+pkgver=0.1.11.r35.gba855de
pkgrel=1
+
+# we (currently) need to build using nightly
+# this can hopefully go away eventually
+# also doesn't build with current nightly:
+# https://github.com/rust-lang-nursery/rustup.rs/commit/76849ce0b78a67ba157eb18fe55e6ff49a380942
+rustv="nightly-2016-05-10"
+chn=$(echo "$rustv" | tr '-' ' ' | cut -d' ' -f1)
+date=$(echo "$rustv" | tr '-' ' ' | cut -d' ' -f2- | tr ' ' '-')
+if test -n "$date"; then
+ date="-$date"
+fi
+target="rust-$chn-$CARCH-unknown-linux-gnu"
+
pkgdesc="The Rust toolchain installer"
arch=('any')
url="https://github.com/rust-lang-nursery/rustup.rs"
license=('MIT' 'Apache')
-makedepends=('cargo-nightly' 'git')
+makedepends=('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')
+source=(
+ "${pkgname}::git+https://github.com/rust-lang-nursery/rustup.rs.git"
+ "$target$date.tar.gz::https://static.rust-lang.org/dist/${date#-}/${target}.tar.gz"
+ "$target$date.tar.gz.asc::https://static.rust-lang.org/dist/${date#-}/${target}.tar.gz.asc"
+)
+# The Rust GPG Key: https://keybase.io/rust
+validpgpkeys=("108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE")
+md5sums=('SKIP'
+ '009ccdef55366033a1db0f74762a7fa3'
+ 'SKIP')
pkgver() {
cd "$srcdir/${pkgname}"
@@ -20,26 +41,19 @@ pkgver() {
}
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
+ # set up nightly cargo
+ cd "$srcdir/$target"
+ msg2 "Setting up cargo $chn ${date#-}"
+ ./install.sh --prefix="$srcdir/cargo"
+ export PATH="$srcdir/cargo/bin:$PATH"
+
+ msg2 "Building rustup"
+ cd "$srcdir/$pkgname"
+ cargo build --release --bin rustup-init
msg2 "Running rustup-init"
mkdir -p "$srcdir/tmp/.cargo"
- env "HOME=$srcdir/tmp" target/release/rustup-init -y --no-modify-path
+ env -u CARGO_HOME "HOME=$srcdir/tmp" target/release/rustup-init -y --no-modify-path
}
package() {