@@ -6,13 +6,13 @@ pkgrel=1
6
6
arch=('i686' 'x86_64')
7
7
pkgdesc='A safe, concurrent, practical language from Mozilla.'
8
8
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' )
11
11
depends=('shared-mime-info')
12
12
license=('MIT' 'Apache')
13
13
source=("https://static.rust-lang.org/dist/rust-nightly-${CARCH}-unknown-linux-gnu.tar.gz"
14
14
'https://raw.githubusercontent.com/rust-lang/rust/master/src/etc/gedit/share/mime/packages/rust.xml'
15
- " rust-nightly.conf" )
15
+ ' rust-nightly.conf' )
16
16
sha256sums=('SKIP' 'SKIP' 'SKIP')
17
17
install=rust.install
18
18
options=(staticlibs !strip)
@@ -21,28 +21,23 @@ package() {
21
21
local INSTALL_DIR=/usr/local
22
22
local MAN_DIR=/usr/local/man
23
23
24
- # Rust
24
+ # Rust, Cargo and Documentation.
25
25
cd rust-nightly-${CARCH}-unknown-linux-gnu
26
26
./install.sh --prefix=${pkgdir}${INSTALL_DIR} --mandir=${pkgdir}${MAN_DIR}
27
27
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 {} ';'
33
32
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.
39
34
mkdir -p "${pkgdir}/usr/share/mime/packages"
40
35
install -m 644 "${srcdir}/rust.xml" "${pkgdir}/usr/share/mime/packages/rust.xml"
41
36
42
- # Dynamic library configuration (no LD_LIBRARY_PATH required).
37
+ # Dynamic linker configuration (no LD_LIBRARY_PATH required).
43
38
mkdir -p "${pkgdir}/etc/ld.so.conf.d"
44
39
install -m 644 "${srcdir}/rust-nightly.conf" "${pkgdir}/etc/ld.so.conf.d/rust-nightly.conf"
45
40
46
- # remove manifest file referencing $pkgdir
41
+ # Remove manifest file referencing $pkgdir.
47
42
rm -f "${pkgdir}/usr/local/lib/rustlib/manifest-rustc"
48
43
}
0 commit comments