Date: Thursday, May 4, 2023 @ 00:25:25
  Author: orhun
Revision: 1458669

upgpkg: rustup 1.26.0-2: move symlinks to /usr/lib/rustup/bin (fixes FS#78309)

Added:
  rustup/trunk/rustup-profile.sh
Modified:
  rustup/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   15 ++++++++++-----
 rustup-profile.sh |    5 +++++
 2 files changed, 15 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-05-04 00:01:54 UTC (rev 1458668)
+++ PKGBUILD    2023-05-04 00:25:25 UTC (rev 1458669)
@@ -1,9 +1,10 @@
 # Maintainer: Sven-Hendrik Haase <svenst...@archlinux.org>
+# Maintainer: Orhun Parmaksız <or...@archlinux.org>
 # Contributor: Jonathon Fernyhough <jonathon_at_manjaro_dot_org>
 # Contributor: Jon Gjengset <j...@tsp.io>
 pkgname=rustup
 pkgver=1.26.0
-pkgrel=1
+pkgrel=2
 pkgdesc="The Rust toolchain installer"
 arch=('x86_64')
 url="https://github.com/rust-lang/rustup.rs";
@@ -14,12 +15,14 @@
             'gdb: rust-gdb script')
 provides=('rust' 'cargo' 'rust-nightly' 'cargo-nightly' 'rustfmt' 'rust-src'
           'lib32-rust-libs' 'rust-musl' 'rust-wasm' 'rust-analyzer')
-conflicts=('rust' 'cargo' 'rustfmt' 'rust-analyzer')
+conflicts=('rust' 'cargo' 'rustfmt')
 replaces=('cargo-tree')
 install='post.install'
 options=("!lto")
-source=("rustup-${pkgver}.tar.gz::https://github.com/rust-lang/rustup.rs/archive/${pkgver}.tar.gz";)
-sha512sums=('bc7cb580640248a601dbafb87c3a9e908b6c687377b4e0f88280576af15527f5837d9463f7831c14b0c274cd3170449e634cd851e0d03ea4ff1d0461d4a941be')
+source=("rustup-${pkgver}.tar.gz::https://github.com/rust-lang/rustup.rs/archive/${pkgver}.tar.gz";
+        "rustup-profile.sh")
+sha512sums=('bc7cb580640248a601dbafb87c3a9e908b6c687377b4e0f88280576af15527f5837d9463f7831c14b0c274cd3170449e634cd851e0d03ea4ff1d0461d4a941be'
+            
'd5f96f00016877a538019313837a126490f085b28b3ad3084c7f00170b6a0ca906cb63cb57584b0bf5781e197b57fe1849cb80353e3dc60f0fb222ced6c05988')
 _binlinks=('cargo' 'rustc' 'rustdoc' 'rust-gdb' 'rust-lldb' 'rls' 'rustfmt' 
'cargo-fmt' 'cargo-clippy' 'clippy-driver' 'cargo-miri' 'rust-analyzer')
 
 build() {
@@ -29,10 +32,12 @@
 
 package() {
   cd "$pkgname-${pkgver}"
+  install -d "${pkgdir}/usr/lib/$pkgname/bin"
   install -Dm755 "target/release/rustup-init" "${pkgdir}/usr/bin/rustup"
   for link in "${_binlinks[@]}"; do
-      ln -s /usr/bin/rustup "${pkgdir}/usr/bin/${link}"
+      ln -s /usr/bin/rustup "${pkgdir}/usr/lib/$pkgname/bin/${link}"
   done
+  install -Dm755 "$srcdir/$pkgname-profile.sh" 
"$pkgdir/etc/profile.d/$pkgname.sh"
 
   # Generate completion files.
   mkdir -p "$pkgdir/usr/share/bash-completion/completions"

Added: rustup-profile.sh
===================================================================
--- rustup-profile.sh                           (rev 0)
+++ rustup-profile.sh   2023-05-04 00:25:25 UTC (rev 1458669)
@@ -0,0 +1,5 @@
+# Set path to rustup symlinks if they exist
+
+[ -d /usr/lib/rustup/bin ] && PATH=$PATH:/usr/lib/rustup/bin
+
+export PATH

Reply via email to