Skip to content

Commit 9720f97

Browse files
committed
Update for new upstream build infrastructure.
* Cargo and offline docs included by default in rust-nightly-bin. * Retire cargo-nightly-bin (marked as a conflict). Closes #9 Closes #11
1 parent abe3eec commit 9720f97

File tree

4 files changed

+21
-54
lines changed

4 files changed

+21
-54
lines changed

Makefile

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
rust_makefile=https://raw.githubusercontent.com/mozilla/rust/master/mk/main.mk
2-
cargo_makefile=https://raw.githubusercontent.com/rust-lang/cargo/master/Makefile.in
32

4-
default: rust-src-pkg cargo-src-pkg
3+
default: rust-src-pkg
54

65
# Upload
7-
upload: rust-upload cargo-upload
6+
upload: rust-upload
87

98
%-upload: %-src-pkg
109
burp $*-nightly-bin-*.src.tar.gz
1110

1211
# Binary packages
13-
bin-pkgs: rust-bin-pkg cargo-bin-pkg
14-
1512
%-bin-pkg: %.pkgbuild
1613
makepkg -p $<
1714
rm -rf pkg src
1815

1916
# Source packages
20-
source-pkgs: rust-src-pkg cargo-src-pkg
21-
2217
%-src-pkg: %.pkgbuild
2318
mkaurball -p $< -f
2419
@rm -f $*.xml

README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ Rust & Cargo Nightly
33

44
PKGBUILD generator for Arch Linux that makes installing the nightly Rust & Cargo builds easy.
55

6-
This code is run every 24 hours and updates the following AUR packages:
6+
This code is run every 24 hours (at 02:30 UTC) and updates the following AUR package:
77

8-
* Rust: https://aur.archlinux.org/packages/rust-nightly-bin/
9-
* Cargo: https://aur.archlinux.org/packages/cargo-nightly-bin/
8+
https://aur.archlinux.org/packages/rust-nightly-bin/
109

11-
The Rust package includes the compiler and a MIME type for Rust source code.
10+
## Components
1211

13-
## Update Times
12+
The AUR package includes the following resources:
1413

15-
* Rust: 02:30 UTC
16-
* Cargo: 16:00 UTC
14+
* The Rust compiler, `rustc`.
15+
* Cargo, the Rust package manager.
16+
* Offline HTML documentation, available [here](file:///usr/local/share/doc/rust/html/index.html)
17+
* A `.rs` MIME type for Rust source code.
1718

1819
## Syntax Highlighting
1920

templates/cargo.pkgbuild

-24
This file was deleted.

templates/rust.pkgbuild

+11-16
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ pkgrel=1
66
arch=('i686' 'x86_64')
77
pkgdesc='A safe, concurrent, practical language from Mozilla.'
88
url='http://www.rust-lang.org/'
9-
provides='rust'
10-
conflicts=('rust' 'rust-git' 'rust-nightly')
9+
provides=('rust' 'cargo')
10+
conflicts=('rust' 'rust-git' 'rust-nightly' 'cargo-nightly-bin')
1111
depends=('shared-mime-info')
1212
license=('MIT' 'Apache')
1313
source=("https://static.rust-lang.org/dist/rust-nightly-${CARCH}-unknown-linux-gnu.tar.gz"
1414
'https://raw.githubusercontent.com/rust-lang/rust/master/src/etc/gedit/share/mime/packages/rust.xml'
15-
"rust-nightly.conf")
15+
'rust-nightly.conf')
1616
sha256sums=('SKIP' 'SKIP' 'SKIP')
1717
install=rust.install
1818
options=(staticlibs !strip)
@@ -21,28 +21,23 @@ package() {
2121
local INSTALL_DIR=/usr/local
2222
local MAN_DIR=/usr/local/man
2323

24-
# Rust
24+
# Rust, Cargo and Documentation.
2525
cd rust-nightly-${CARCH}-unknown-linux-gnu
2626
./install.sh --prefix=${pkgdir}${INSTALL_DIR} --mandir=${pkgdir}${MAN_DIR}
2727

28-
# Docs
29-
# local DOC_DIR=${pkgdir}${INSTALL_DIR}/share/doc/rust/html
30-
# echo "Copying HTML docs to ${DOC_DIR}"
31-
# mkdir -p ${DOC_DIR}
32-
# cp -r doc/* ${DOC_DIR}
28+
# Fix doc permissions.
29+
local DOC_DIR=${pkgdir}${INSTALL_DIR}/share/doc/rust/html
30+
find ${DOC_DIR} -type f -exec chmod 644 {} ';'
31+
find ${DOC_DIR} -type d -exec chmod 775 {} ';'
3332

34-
# echo "Setting permissions on docs."
35-
# find ${DOC_DIR} -type f -exec chmod 644 {} ';'
36-
# find ${DOC_DIR} -type d -exec chmod 775 {} ';'
37-
38-
# MIME type association
33+
# Establish .rs MIME type association.
3934
mkdir -p "${pkgdir}/usr/share/mime/packages"
4035
install -m 644 "${srcdir}/rust.xml" "${pkgdir}/usr/share/mime/packages/rust.xml"
4136

42-
# Dynamic library configuration (no LD_LIBRARY_PATH required).
37+
# Dynamic linker configuration (no LD_LIBRARY_PATH required).
4338
mkdir -p "${pkgdir}/etc/ld.so.conf.d"
4439
install -m 644 "${srcdir}/rust-nightly.conf" "${pkgdir}/etc/ld.so.conf.d/rust-nightly.conf"
4540

46-
# remove manifest file referencing $pkgdir
41+
# Remove manifest file referencing $pkgdir.
4742
rm -f "${pkgdir}/usr/local/lib/rustlib/manifest-rustc"
4843
}

0 commit comments

Comments
 (0)