Last active
August 29, 2015 14:19
-
-
Save dlight/e6029dc3bb9f2f7dce60 to your computer and use it in GitHub Desktop.
rust 1.0.0-beta.2 PKGBUILD (for https://aur.archlinux.org/packages/rust-beta-bin)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# checks the sha256sums of Rust releases | |
echo > sha256sums | |
for version in 1.0.0-beta.2; do | |
for arch in i686 x86_64; do | |
url=https://static.rust-lang.org/dist/rust-${version}-${arch}-unknown-linux-gnu.tar.gz | |
wget -c $url && sha256sum $(basename $url) >> sha256sums | |
done | |
done | |
cat sha256sums |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Kevin Knapp | |
pkgname=rust-beta-bin | |
pkgver=1.0.0_beta.2 | |
pkgrel=1 | |
arch=('i686' 'x86_64') | |
pkgdesc='Fast, concurrent, safe. The Rust programming language and its package manager, Cargo.' | |
url='http://www.rust-lang.org/' | |
provides=('rust' 'cargo') | |
conflicts=('rust' 'rust-nightly-bin' 'rust-git' 'rust-nightly' 'cargo-nightly-bin') | |
depends=('shared-mime-info') | |
license=('MIT' 'Apache') | |
source=('https://raw.githubusercontent.com/rust-lang/gedit-config/master/share/mime/packages/rust.xml' | |
'rust-beta.conf') | |
sha256sums=('a2a6609d6a89dd57f1bf874da222316c2b3c8ffcfe5b5ae87f8489096744446d' | |
'fc2ed32e9841d2080803b117a773aa6606fc74391fec76fbadd2e952ca1fc256') | |
source_x86_64=("https://static.rust-lang.org/dist/rust-${pkgver//_/-}-${CARCH}-unknown-linux-gnu.tar.gz") | |
sha256sums_x86_64=('5a62b0c94f00105ee929d979476e5eb229e2068e3b0bf88fbd14fbee8097ecca') | |
source_i686=("https://static.rust-lang.org/dist/rust-${pkgver//_/-}-${CARCH}-unknown-linux-gnu.tar.gz") | |
sha256sums_i686=('92715dc21a8d940bf5a22aab9685a93cceb21f013476754418c8c69d1ad8853f') | |
install=rust.install | |
options=(staticlibs !strip) | |
package() { | |
local INSTALL_DIR=/usr/local | |
local MAN_DIR=/usr/local/man | |
# Rust, Cargo and Documentation. | |
cd rust-${pkgver//_/-}-${CARCH}-unknown-linux-gnu | |
./install.sh --prefix=${pkgdir}${INSTALL_DIR} --mandir=${pkgdir}${MAN_DIR} | |
# Establish .rs MIME type association. | |
mkdir -p "${pkgdir}/usr/share/mime/packages" | |
install -m 644 "${srcdir}/rust.xml" "${pkgdir}/usr/share/mime/packages/rust.xml" | |
# Dynamic linker configuration (no LD_LIBRARY_PATH required). | |
mkdir -p "${pkgdir}/etc/ld.so.conf.d" | |
install -m 644 "${srcdir}/rust-beta.conf" "${pkgdir}/etc/ld.so.conf.d/rust-beta.conf" | |
# Remove manifest file referencing $pkgdir. | |
rm -f "${pkgdir}/usr/local/lib/rustlib/manifest-rustc" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment